Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error adding teams to StageGroup (aka Pool) #71

Closed
goodtune opened this issue Apr 13, 2024 · 0 comments · Fixed by #72
Closed

Error adding teams to StageGroup (aka Pool) #71

goodtune opened this issue Apr 13, 2024 · 0 comments · Fixed by #72
Assignees
Labels

Comments

@goodtune
Copy link
Owner

When attempting to link teams to a pool in the admin interface, the following error is thrown:

10.244.9.99 - - [13/Apr/2024:03:18:23 +0000] "POST /admin/fixja/competition/1/seasons/53/division/230/stage/470/pool/122/ HTTP/1.1" 500 151 "https://www.internationaltouch.org/admin/fixja/competition/1/seasons/53/division/230/stage/470/pool/122/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15"
ERROR:django.request:Internal Server Error: /admin/fixja/competition/1/seasons/53/division/230/stage/470/pool/122/
Traceback (most recent call last):
  File "/workspace/.heroku/python/lib/python3.9/site-packages/touchtechnology/content/middleware.py", line 250, in middleware
    obj = Redirect.objects.get(source_url__exact=request.path)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(
touchtechnology.content.models.Redirect.DoesNotExist: Redirect matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/tournamentcontrol/competition/decorators.py", line 184, in _decorated
    return f(request, *args, **kwargs)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper
    return bound_method(*args, **kwargs)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/tournamentcontrol/competition/admin.py", line 1281, in edit_pool
    return self.generic_edit(
  File "/workspace/.heroku/python/lib/python3.9/site-packages/touchtechnology/common/sites.py", line 510, in generic_edit
    obj = form.save()
  File "/workspace/.heroku/python/lib/python3.9/site-packages/tournamentcontrol/competition/forms.py", line 616, in save
    self.instance.teams = self.cleaned_data.get("teams")
  File "/workspace/.heroku/python/lib/python3.9/site-packages/django/db/models/fields/related_descriptors.py", line 545, in __set__
    raise TypeError(
TypeError: Direct assignment to the reverse side of a related set is prohibited. Use teams.set() instead.
@goodtune goodtune self-assigned this Apr 13, 2024
@goodtune goodtune added the bug label Apr 13, 2024
goodtune added a commit that referenced this issue Apr 13, 2024
@goodtune goodtune linked a pull request Apr 13, 2024 that will close this issue
goodtune added a commit that referenced this issue Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant