-
Notifications
You must be signed in to change notification settings - Fork 4
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
Forum, markread: Raise 404, if forum-slug is not found #1220
Conversation
Before the fix, one of the new added tests failed python manage.py test tests.apps.forum.test_views.TestMarkRead Creating test database for alias 'default'... System check identified no issues (0 silenced). ...E ====================================================================== ERROR: test_no_existing_forum (tests.apps.forum.test_views.TestMarkRead) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/chris/Dev/inyoka/tests/apps/forum/test_views.py", line 1565, in test_no_existing_forum response = self.client.get(url, follow=True) [....] File "/home/chris/Dev/inyoka/inyoka/forum/views.py", line 1556, in markread forum = Forum.objects.get(slug=slug) File "/home/chris/Dev/inyoka/inyoka/forum/models.py", line 105, in get forum = self.get_cached(ident) File "/home/chris/Dev/inyoka/inyoka/forum/models.py", line 145, in get_cached forum = super(ForumManager, self).get(slug=slug) File "/home/chris/Dev/inyoka/venv3.5.2/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/chris/Dev/inyoka/venv3.5.2/lib/python3.5/site-packages/django/db/models/query.py", line 380, in get self.model._meta.object_name inyoka.forum.models.DoesNotExist: Forum matching query does not exist. ---------------------------------------------------------------------- Ran 4 tests in 0.554s
I can reproduce the error on forum.ubuntuusers.de, but on staging I get redirected to |
Interestingly, it got an mail from sentry on 2021-05-23: |
Sorry, I meant the staging branch (locally), not the staging instance. |
Are you logged in locally? If not, you will test Lines 1552 to 1554 in 221eb15
http://forum.ubuntuusers.local:8080/ , too.
Thus to reproduce, login and visit manually a URL like |
Ahh! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me as intended
Before the fix, one of the new added tests failed
found by @KaiserBarbarossa in the wild.