Giter Club home page Giter Club logo

Comments (4)

StephDriver avatar StephDriver commented on June 24, 2024

Traceback (most recent call last):
File "/Users/stephdriver/Documents/Janeway/venv/Janeway/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/Users/stephdriver/Documents/Janeway/venv/Janeway/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/stephdriver/Documents/Janeway/venv/Janeway/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
return view_func(request, *args, **kwargs)
File "/Users/stephdriver/Documents/Janeway/janeway/src/submission/decorators.py", line 33, in submission_is_enabled_wrapper
return func(request, *args, **kwargs)
File "/Users/stephdriver/Documents/Janeway/janeway/src/security/decorators.py", line 1371, in _article_is_not_submitted
return func(request, *args, **kwargs)
File "/Users/stephdriver/Documents/Janeway/janeway/src/security/decorators.py", line 728, in wrapper
return func(request, *args, **kwargs)
File "/Users/stephdriver/Documents/Janeway/janeway/src/security/decorators.py", line 66, in wrapper
return func(request, *args, **kwargs)
File "/Users/stephdriver/Documents/Janeway/janeway/src/security/decorators.py", line 1329, in submission_authorised_wrapper
return func(request, *args, **kwargs)
File "/Users/stephdriver/Documents/Janeway/janeway/src/submission/views.py", line 288, in submit_authors
logic.add_user_as_author(author, article)
File "/Users/stephdriver/Documents/Janeway/janeway/src/submission/logic.py", line 48, in add_user_as_author
user.add_account_role("author", article.journal)
File "/Users/stephdriver/Documents/Janeway/janeway/src/core/models.py", line 415, in add_account_role
role = Role.objects.get(slug=role_slug)
File "/Users/stephdriver/Documents/Janeway/venv/Janeway/lib/python3.9/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/stephdriver/Documents/Janeway/venv/Janeway/lib/python3.9/site-packages/django/db/models/query.py", line 640, in get
raise self.model.MultipleObjectsReturned(

Exception Type: MultipleObjectsReturned at /submit/12/authors/
Exception Value: get() returned more than one Role -- it returned 2!

from janeway.

StephDriver avatar StephDriver commented on June 24, 2024

Also happening when I add self as author - so may not be about author choice. Triggered on add self button press.

With add (new) author, the popup is fine, but on submitting the popup with the new author info the error is triggered.

from janeway.

ajrbyers avatar ajrbyers commented on June 24, 2024

In admin, check if you have duplicate Role values for the journal you're loading an article for. We need to add a catch for this though so keep the ticket open.

from janeway.

StephDriver avatar StephDriver commented on June 24, 2024

In admin, check if you have duplicate Role values for the journal you're loading an article for.

Account I was using has multiple roles (editor, reviewer etc) in that journal, but only has each of them once. No duplicates.

from janeway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.