realm_audit_log: Explicitly stringify dict before insertion.

`extra_data` as a `TextField` expects a `str`, but we had been passing
`dict` instead. This is a temporary solution before #18391 to fix the
type annotation.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-07-25 08:54:24 -04:00
committed by Tim Abbott
parent 4be2f0ed10
commit ad17096c9c
5 changed files with 9 additions and 13 deletions

View File

@@ -300,7 +300,7 @@ def do_change_avatar_fields(
realm=user_profile.realm,
modified_user=user_profile,
event_type=RealmAuditLog.USER_AVATAR_SOURCE_CHANGED,
extra_data={"avatar_source": avatar_source},
extra_data=str({"avatar_source": avatar_source}),
event_time=event_time,
acting_user=acting_user,
)