mirror of https://github.com/zulip/zulip.git
3623681d30
The codepath for moving a topic changes the message.recipient_id to the id of the new recipient, but later, in update_messages_for_topic_edit, it uses message.recipient when querying for messages with the matching topic in the *old* stream (because those are the other messages that need to be moved). This is a bug which happens to work fine, because in Django 2, if message.recipient gets fetched first and then message.recipient_id is mutated, message.recipient will not be altered and thus will retain the outdated, previously fetched value. In Django 3 changing .recipient_id causes .recipient to be updated to the new Recipient objects, which is the Recipient of the *new* stream. That will cause the bug to manifest. This is a bugfix preparing for the upgrade to Django 3. |
||
---|---|---|
.. | ||
data_import | ||
lib | ||
management | ||
migrations | ||
openapi | ||
templatetags | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |