DjangoGirls/djangogirls

EventPageMenu.MultipleObjectsReturned: Detected non-unique values in field '{rank_field}' used for sorting this model.

Opened this issue · 0 comments

Sentry Issue: DJANGO-GIRLS-WEBSITE-6H

EventPageMenu.MultipleObjectsReturned: get() returned more than one EventPageMenu -- it returned more than 20!
  File "adminsortable2/admin.py", line 322, in move_item
    obj = model.objects.get(**obj_filters)
  File "django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 439, in get
    raise self.model.MultipleObjectsReturned(

EventPageMenu.MultipleObjectsReturned: Detected non-unique values in field '{rank_field}' used for sorting this model.
Consider to run 
    python manage.py reorder {model._meta.label}
to adjust this inconsistency.
(3 additional frame(s) were not displayed)
...
  File "django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "django/contrib/admin/sites.py", line 232, in inner
    return view(request, *args, **kwargs)
  File "adminsortable2/admin.py", line 256, in update_order
    moved_items = list(self._move_item(request, startorder, endorder))
  File "adminsortable2/admin.py", line 292, in _move_item
    return self.move_item(startorder, endorder, extra_model_filters)
  File "adminsortable2/admin.py", line 326, in move_item
    raise model.MultipleObjectsReturned(