I caught the following exception:
get() returned more than one UnsafeTagAccess -- it returned 2!
Traceback (most recent call last):
File "/home/novikov/work/klever/bridge/marks/views.py", line 536, in show_tags
tags_data = GetTagsData(tags_type, user=request.user)
File "/home/novikov/work/klever/bridge/marks/tags.py", line 151, in __init__
self.__get_tags()
File "/home/novikov/work/klever/bridge/marks/tags.py", line 168, in __get_tags
[TagData(self.user, tag) for tag in UnsafeTag.objects.filter(**tags_filter).order_by('tag')]
File "/home/novikov/work/klever/bridge/marks/tags.py", line 168, in <listcomp>
[TagData(self.user, tag) for tag in UnsafeTag.objects.filter(**tags_filter).order_by('tag')]
File "/home/novikov/work/klever/bridge/marks/tags.py", line 135, in __init__
self.can_edit = self._access.edit()
File "/home/novikov/work/klever/bridge/marks/tags.py", line 60, in edit
return self._is_manager or self.__has_edit_access()
File "/home/novikov/work/klever/bridge/marks/tags.py", line 43, in __has_edit_access
return access_table.objects.get(user=self.user, tag=self.tag).modification
File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/db/models/query.py", line 383, in get
(self.model._meta.object_name, num)
marks.models.MultipleObjectsReturned: get() returned more than one UnsafeTagAccess -- it returned 2!