mirror of
https://github.com/element-hq/synapse
synced 2024-08-18 23:50:52 +00:00
Also check for dict since sometimes they aren't frozen
This commit is contained in:
parent
cea4e4e7b2
commit
6d4e6d4cba
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ def _copy_field(src, dst, field):
|
||||||
key_to_move = field.pop(-1)
|
key_to_move = field.pop(-1)
|
||||||
sub_dict = src
|
sub_dict = src
|
||||||
for sub_field in field: # e.g. sub_field => "content"
|
for sub_field in field: # e.g. sub_field => "content"
|
||||||
if sub_field in sub_dict and type(sub_dict[sub_field]) == frozendict:
|
if sub_field in sub_dict and type(sub_dict[sub_field]) in [dict, frozendict]:
|
||||||
sub_dict = sub_dict[sub_field]
|
sub_dict = sub_dict[sub_field]
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue