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 500 in talk detail of talks scheduled multiple times #730

Closed
shoetten opened this issue Jun 19, 2019 · 1 comment
Closed

Error 500 in talk detail of talks scheduled multiple times #730

shoetten opened this issue Jun 19, 2019 · 1 comment
Labels
type: bug Needs fix

Comments

@shoetten
Copy link
Contributor

Current Behavior

Pretalx throws a HTTP 500, when trying to view the talk details of a talk, which is scheduled multiple times (via a slot_count >= 2).

See relevant logs
ERROR 2019-06-18 16:50:47,289 django.request log Internal Server Error: /event/talk/UGYTTW/
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/django/contrib/auth/mixins.py", line 83, in dispatch
    if not self.has_permission():
  File "/pretalx/src/pretalx/common/mixins/views.py", line 174, in has_permission
    result = super().has_permission()
  File "/usr/local/lib/python3.7/site-packages/rules/contrib/views.py", line 47, in has_permission
    obj = self.get_permission_object()
  File "/pretalx/src/pretalx/agenda/views/talk.py", line 90, in get_permission_object
    return self.submission
  File "/usr/local/lib/python3.7/site-packages/django_context_decorator.py", line 50, in __get__
    return self.func.__get__(instance, cls) if hasattr(self.func, '__get__') else self.func
  File "/usr/local/lib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/pretalx/src/pretalx/agenda/views/talk.py", line 87, in submission
    return self.get_object()
  File "/pretalx/src/pretalx/agenda/views/talk.py", line 74, in get_object
    code__iexact=self.kwargs['slug'],
  File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 412, in get
    (self.model._meta.object_name, num)
pretalx.submission.models.submission.Submission.MultipleObjectsReturned: get() returned more than one Submission -- it returned 2!

Expected Behavior

Pretalx shows the talk detail view.

Steps to Reproduce

  1. Create a submission and allow it to be scheduled multiple times.
  2. Schedule it more than once in the schedule and release a version.
  3. Try to access the talk details from the public schedule.

Context

We have multiple talks that happen four days in a row, so we want to show those on 4 different days in the schedule.

Your Environment

  • Version used: 1.0.2

  • Environment name and version:
    python 3.7 inside a Docker Container
    MariaDB 10.3

  • Operating System and version (desktop or mobile):
    Arch Linux on the Client and the python:3.7 docker base image on the server.

  • Link to your instance, if in production:
    Production Instance
    But be aware, we removed the duplicated talks (and replaced them by generic ones), to that the details view works as intended again.

@rixx rixx added the type: bug Needs fix label Jun 20, 2019
@rixx rixx closed this as completed in 1790ee4 Jun 26, 2019
@rixx
Copy link
Member

rixx commented Jun 26, 2019

This issue is fixed in the 1.0.3 bugfix release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Needs fix
Projects
None yet
Development

No branches or pull requests

2 participants