import_utils: Fix wrong usage of model_to_dict.

The argument `exclude` expects a `list` or `set` of field names,
not a `str`.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2022-06-21 16:45:40 -04:00
committed by Tim Abbott
parent 0ec561ab57
commit 67fda5516f

View File

@@ -81,7 +81,7 @@ def build_zerver_realm(
description=f"Organization imported from {other_product}!",
)
auth_methods = [[flag[0], flag[1]] for flag in realm.authentication_methods]
realm_dict = model_to_dict(realm, exclude="authentication_methods")
realm_dict = model_to_dict(realm, exclude=["authentication_methods"])
realm_dict["authentication_methods"] = auth_methods
return [realm_dict]