Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix: Fix invalid query when killing submissions
This fixes the below production error: ``` File ".../tin/tin/apps/submissions/views.py", line 106, in kill_view submission = get_object_or_404(submissions_editable, id=submission_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../site-packages/django/shortcuts.py", line 85, in get_object_or_404 return queryset.get(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../site-packages/django/db/models/query.py", line 640, in get raise self.model.MultipleObjectsReturned( tin.apps.submissions.models.Submission.MultipleObjectsReturned: get() returned more than one Submission -- it returned 5! ``` One solution would have been to append a `.distinct()` to the query, but instead it was replaced by `filter_visible()` for consistency.
- Loading branch information