zulip/zerver/actions
Zixuan James Li 30495cec58 migration: Rename extra_data_json to extra_data in audit log models.
This migration applies under the assumption that extra_data_json has
been populated for all existing and coming audit log entries.

- This removes the manual conversions back and forth for extra_data
throughout the codebase including the orjson.loads(), orjson.dumps(),
and str() calls.

- The custom handler used for converting Decimal is removed since
DjangoJSONEncoder handles that for extra_data.

- We remove None-checks for extra_data because it is now no longer
nullable.

- Meanwhile, we want the bouncer to support processing RealmAuditLog entries for
remote servers before and after the JSONField migration on extra_data.

- Since now extra_data should always be a dict for the newer remote
server, which is now migrated, the test cases are updated to create
RealmAuditLog objects by passing a dict for extra_data before
sending over the analytics data. Note that while JSONField allows for
non-dict values, a proper remote server always passes a dict for
extra_data.

- We still test out the legacy extra_data format because not all
remote servers have migrated to use JSONField extra_data.
This verifies that support for extra_data being a string or None has not
been dropped.

Co-authored-by: Siddharth Asthana <siddharthasthana31@gmail.com>
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-08-16 17:18:14 -07:00
..
__init__.py
alert_words.py actions: Split out zerver.actions.alert_words. 2022-04-14 17:14:31 -07:00
bots.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
create_realm.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
create_user.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
custom_profile_fields.py ruff: Fix PLR1714 Consider merging multiple comparisons. 2023-07-23 15:21:33 -07:00
default_streams.py python: Convert translated positional {} fields to {named} fields. 2023-07-18 15:19:07 -07:00
hotspots.py actions: Split out zerver.actions.hotspots. 2022-04-14 17:14:31 -07:00
invites.py emails: Add corporate_enabled to context for emails. 2023-05-01 10:32:43 -07:00
message_delete.py zerver: Update comments with "private message" or "PM". 2023-06-23 11:24:13 -07:00
message_edit.py message_edit: Fix wildcard_mentioned flag set for all user-messages. 2023-08-16 11:31:56 -07:00
message_flags.py python: Convert translated positional {} fields to {named} fields. 2023-07-18 15:19:07 -07:00
message_send.py message_send: Fix wildcard_mentioned flag unset for few participants. 2023-08-16 11:31:56 -07:00
muted_users.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
presence.py presence: Support null values in UserPresence. 2023-04-26 14:26:47 -07:00
reactions.py reactions: Add error code for duplicate addition/removal. 2023-07-19 16:18:31 -07:00
realm_domains.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
realm_emoji.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
realm_export.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
realm_icon.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
realm_linkifiers.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
realm_logo.py django_api: Extract send_event_on_commit helper. 2023-06-19 13:42:40 -07:00
realm_playgrounds.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
realm_settings.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
scheduled_messages.py scheduled-messages: Split out edit scheduled message endpoint. 2023-05-26 18:05:55 -07:00
streams.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
submessage.py django_api: Extract send_event_on_commit helper. 2023-06-19 13:42:40 -07:00
typing.py python: Convert translated positional {} fields to {named} fields. 2023-07-18 15:19:07 -07:00
uploads.py uploads: Rewrite comment in do_claim_attachments to improve clarity. 2023-08-15 10:08:11 -07:00
user_activity.py Remove statsd support. 2023-04-25 19:58:16 -07:00
user_groups.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
user_settings.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
user_status.py user-status: Stop updating the UserStatus model for away updates. 2022-09-23 12:27:54 -07:00
user_topics.py user_topics: Update 'set visibility policy' codepath for bulk db operations. 2023-03-29 09:50:06 -07:00
users.py migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
video_calls.py actions: Split out zerver.actions.video_calls. 2022-04-14 17:14:30 -07:00