mirror of https://github.com/zulip/zulip.git
queue_processors: Clean up the extra_data dict code.
We don't want to add a `deleted_timestamp` key until the export is actually deleted.
This commit is contained in:
parent
6f6efa516d
commit
7d178bbb0f
|
@ -2767,7 +2767,6 @@ class EventsRegisterTest(ZulipTestCase):
|
|||
('acting_user_id', check_int),
|
||||
('export_data', check_dict_only([
|
||||
('export_path', check_string),
|
||||
('deleted_timestamp', equals(None))
|
||||
])),
|
||||
]))),
|
||||
])
|
||||
|
|
|
@ -619,10 +619,11 @@ class DeferredWorker(QueueProcessingWorker):
|
|||
delete_after_upload=True)
|
||||
assert public_url is not None
|
||||
|
||||
# Store the relative URL of the export.
|
||||
# Update the extra_data field now that the export is complete.
|
||||
export_event = RealmAuditLog.objects.get(id=event['id'])
|
||||
export_event.extra_data = ujson.dumps({'export_path': urllib.parse.urlparse(public_url).path,
|
||||
'deleted_timestamp': None})
|
||||
export_event.extra_data = ujson.dumps(dict(
|
||||
export_path=urllib.parse.urlparse(public_url).path,
|
||||
))
|
||||
export_event.save(update_fields=['extra_data'])
|
||||
|
||||
# Send a private message notification letting the user who
|
||||
|
|
Loading…
Reference in New Issue