Skip to content

MultipleObjectsReturned -- get() returned more than one WorkflowTemplate

Viewing a workflow template results in http/500

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/asgiref/sync.py", line 486, in thread_handler
    raise exc_info[1]
    ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 42, in inner
    response = await get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/asgiref/sync.py", line 486, in thread_handler
    raise exc_info[1]
    ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 253, in _get_response_async
    response = await wrapped_callback(

  File "/usr/lib/python3/dist-packages/asgiref/sync.py", line 448, in __call__
    ret = await asyncio.wait_for(future, timeout=None)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/tasks.py", line 442, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/lib/python3/dist-packages/asgiref/current_thread_executor.py", line 22, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/asgiref/sync.py", line 490, in thread_handler
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/web/views/base.py", line 122, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 143, in dispatch
    return handler(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/views/generic/detail.py", line 108, in get
    self.object = self.get_object()
                  ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/web/views/workflow_templates.py", line 37, in get_object
    workflow_template = queryset.get(name=self.kwargs["name"])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 640, in get
    raise self.model.MultipleObjectsReturned(

Exception Type: MultipleObjectsReturned at REDACTED
Exception Value: get() returned more than one WorkflowTemplate -- it returned 4!
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information