Open C14L opened 8 years ago
Fixed the symptoms but not the cause. Dupes are removed, and the exception raised by get() is handled. Still need to set Subscribed.META.unique_together = [user, sr]
Subscribed.META.unique_together = [user, sr]
There are about 30 users with duplicate Sr subscriptions.
Subscribed.objects.values('user', 'sr').annotate(Count('id')).order_by().filter(id__count__gt=1)
Remove dupes and add Subscribed.META.unique_together = [user, sr]
Example: http://i.imgur.com/KOREZDW.jpg
Fixed the symptoms but not the cause. Dupes are removed, and the exception raised by get() is handled. Still need to set
Subscribed.META.unique_together = [user, sr]
There are about 30 users with duplicate Sr subscriptions.
Subscribed.objects.values('user', 'sr').annotate(Count('id')).order_by().filter(id__count__gt=1)
Remove dupes and add
Subscribed.META.unique_together = [user, sr]
Example: http://i.imgur.com/KOREZDW.jpg