After Jira import and making some stories (I think mostly made from the sprint view) some of them don’t show up when clicking on them/return a 500
looking at the logs I get
aiga-docker-taiga-back-1 | ERROR:2023-03-22 22:11:42,085: Internal Server Error: /api/v1/userstories/by_ref
taiga-docker-taiga-back-1 | Traceback (most recent call last):
taiga-docker-taiga-back-1 | File “/opt/venv/lib/python3.7/site-packages/django/core/handlers/exception.py”, line 34, in inner
taiga-docker-taiga-back-1 | response = get_response(request)
taiga-docker-taiga-back-1 | File “/opt/venv/lib/python3.7/site-packages/django/core/handlers/base.py”, line 115, in _get_response
taiga-docker-taiga-back-1 | response = self.process_exception_by_middleware(e, request)
taiga-docker-taiga-back-1 | File “/opt/venv/lib/python3.7/site-packages/django/core/handlers/base.py”, line 113, in _get_response
taiga-docker-taiga-back-1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
taiga-docker-taiga-back-1 | File “/taiga-back/taiga/base/api/viewsets.py”, line 95, in view
taiga-docker-taiga-back-1 | return self.dispatch(request, *args, **kwargs)
taiga-docker-taiga-back-1 | File “/opt/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py”, line 54, in wrapped_view
taiga-docker-taiga-back-1 | return view_func(*args, **kwargs)
taiga-docker-taiga-back-1 | File “/taiga-back/taiga/base/api/views.py”, line 449, in dispatch
taiga-docker-taiga-back-1 | response = self.handle_exception(exc)
taiga-docker-taiga-back-1 | File “/taiga-back/taiga/base/api/views.py”, line 447, in dispatch
taiga-docker-taiga-back-1 | response = handler(request, *args, **kwargs)
taiga-docker-taiga-back-1 | File “/taiga-back/taiga/projects/mixins/by_ref.py”, line 37, in by_ref
taiga-docker-taiga-back-1 | return self.retrieve(request, **retrieve_kwargs)
taiga-docker-taiga-back-1 | File “/taiga-back/taiga/base/api/mixins.py”, line 140, in retrieve
taiga-docker-taiga-back-1 | self.object = get_object_or_404(self.get_queryset(), **kwargs)
taiga-docker-taiga-back-1 | File “/taiga-back/taiga/base/api/utils/init.py”, line 46, in get_object_or_404
taiga-docker-taiga-back-1 | return _get_object_or_404(queryset, *filter_args, **filter_kwargs)
taiga-docker-taiga-back-1 | File “/opt/venv/lib/python3.7/site-packages/django/shortcuts.py”, line 93, in get_object_or_404
taiga-docker-taiga-back-1 | return queryset.get(*args, **kwargs)
taiga-docker-taiga-back-1 | File “/opt/venv/lib/python3.7/site-packages/django/db/models/query.py”, line 412, in get
taiga-docker-taiga-back-1 | (self.model._meta.object_name, num)
taiga-docker-taiga-back-1 | taiga.projects.userstories.models.UserStory.MultipleObjectsReturned: get() returned more than one UserStory – it returned 2!
Looking at the database I get several dupes. How do I fix it? can I delete some of the dupes from the database? or change the ref number?
Is there a bug filed for this? How do I prevent it in the future since this seems like a serious bug.