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

Issues when someone replies to their own PM. #683

Open
zorbathut opened this issue Aug 25, 2023 · 0 comments
Open

Issues when someone replies to their own PM. #683

zorbathut opened this issue Aug 25, 2023 · 0 comments
Labels
bug Something isn't working P2 priority

Comments

@zorbathut
Copy link
Contributor

Weird crash bug here!

Visit the Notifications page, get this:

rdrama-site-1      | Traceback (most recent call last):
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2548, in __call__
rdrama-site-1      |     return self.wsgi_app(environ, start_response)
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
rdrama-site-1      |     response = self.handle_exception(e)
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2525, in wsgi_app
rdrama-site-1      |     response = self.full_dispatch_request()
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1822, in full_dispatch_request
rdrama-site-1      |     rv = self.handle_user_exception(e)
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1820, in full_dispatch_request
rdrama-site-1      |     rv = self.dispatch_request()
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
rdrama-site-1      |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
rdrama-site-1      |   File "/service/files/helpers/wrappers.py", line 111, in wrapper
rdrama-site-1      |     return make_response(f(*args, v=v, **kwargs))
rdrama-site-1      |   File "/service/files/routes/front.py", line 80, in notifications_main
rdrama-site-1      |     return render_template("notifications.html",
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 147, in render_template
rdrama-site-1      |     return _render(app, template, context)
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/flask/templating.py", line 130, in _render
rdrama-site-1      |     rv = template.render(context)
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
rdrama-site-1      |     self.environment.handle_exception()
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
rdrama-site-1      |     raise rewrite_traceback_stack(source=source)
rdrama-site-1      |   File "/service/files/templates/notifications.html", line 1, in top-level template code
rdrama-site-1      |     {% extends "default.html" %}
rdrama-site-1      |   File "/service/files/templates/default.html", line 244, in top-level template code
rdrama-site-1      |     {% block content %}
rdrama-site-1      |   File "/service/files/templates/notifications.html", line 48, in block 'content'
rdrama-site-1      |     {% include "comments.html" %}
rdrama-site-1      |   File "/service/files/templates/comments.html", line 155, in top-level template code
rdrama-site-1      |     {{single_comment(comment, level = parent_level + 1)}}
rdrama-site-1      |   File "/usr/local/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke
rdrama-site-1      |     rv = self._func(*arguments)
rdrama-site-1      |   File "/service/files/templates/comments.html", line 57, in template
rdrama-site-1      |     <span class="font-weight-bold">{{c.header_msg(v, is_notification_page) | safe}}</span>
rdrama-site-1      |   File "/service/files/helpers/lazy.py", line 10, in wrapper
rdrama-site-1      |     o.__dict__["_lazy"][f.__name__] = f(*args, **kwargs)
rdrama-site-1      |   File "/service/files/classes/comment.py", line 386, in header_msg
rdrama-site-1      |     return f"Sent to @{self.senttouser.username}"
rdrama-site-1      | AttributeError: 'NoneType' object has no attribute 'username'

This is mitigated by #682 which is definitely the wrong solution.

I think this was caused by someone sending a PM to the admins, then finding that PM in their sent messages and replying to it - the reply-to-admin-message ended up with a broken state and locked me out of my notifications :V It's sort-of fixed with this, but it's fixed in a way that prevents me from replying to the message.

I kinda feel like we should not be special-casing the Reply button the way we are right now, we should be using the same Action bar for every comment type, and suppressing stuff like the vote arrows when appropriate.

@zorbathut zorbathut added bug Something isn't working P2 priority labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 priority
Projects
None yet
Development

No branches or pull requests

1 participant