janeway icon indicating copy to clipboard operation
janeway copied to clipboard

uncaught MultipleObjectsReturned exception when submitting an article

Open StephDriver opened this issue 8 months ago • 4 comments

This may just be a dev error, but here goes:

  • I was adding a new article via the submissions, using a superuser account and putting in a new/unknown author as the author rather than 'myself'. And I received the following error on submitting the third form in the process (not added the article itself yet).
  • [journal]/submit/13/authors/

Error Message

MultipleObjectsReturned at /submit/12/authors/

get() returned more than one Role -- it returned 2!
Request Method: | POST -- | -- http://localhost:8000/alpha/submit/12/authors/ 4.2.11 MultipleObjectsReturned get() returned more than one Role -- it returned 2! /Users/stephdriver/Documents/Janeway/venv/Janeway/lib/python3.9/site-packages/django/db/models/query.py, line 640, in get submission.decorators.submission_is_enabled_wrapper /Users/stephdriver/Documents/Janeway/venv/Janeway/bin/python3 3.9.19 ['/Users/stephdriver/Documents/Janeway/janeway/src', '/opt/homebrew/Cellar/[email protected]/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python39.zip', '/opt/homebrew/Cellar/[email protected]/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9', '/opt/homebrew/Cellar/[email protected]/3.9.19/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload', '/Users/stephdriver/Documents/Janeway/venv/Janeway/lib/python3.9/site-packages', '/Users/stephdriver/Documents/Janeway/janeway/src/plugins'] Thu, 20 Jun 2024 08:41:29 +0100

details

https://dpaste.com/F2N2BXV9K

StephDriver avatar Jun 20 '24 08:06 StephDriver