diff --git a/zephyr/models.py b/zephyr/models.py index 409131438b..875adab7de 100644 --- a/zephyr/models.py +++ b/zephyr/models.py @@ -760,6 +760,13 @@ class DefaultStream(models.Model): class Meta: unique_together = ("realm", "stream") +# FIXME: The foreign key relationship here is backwards. +# +# We can't easily get a list of streams and their associated colors (if any) in +# a single query. See zephyr.views.gather_subscriptions for an example. +# +# We should change things around so that is possible. Probably this should +# just be a column on Subscription. class StreamColor(models.Model): subscription = models.ForeignKey(Subscription) color = models.CharField(max_length=10)