We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 635bab0 commit e7c0dbaCopy full SHA for e7c0dba
aredis_om/model/model.py
@@ -1198,15 +1198,9 @@ def to_string(s):
1198
map(to_string, res[i + offset][1::2]),
1199
)
1200
1201
-
1202
- try:
1203
- fields["json"] = fields["$"]
1204
- del fields["$"]
1205
- except KeyError:
1206
- pass
1207
1208
- if "json" in fields:
1209
- json_fields = json.loads(fields["json"])
+ # $ means a json entry
+ if fields.get("$"):
+ json_fields = json.loads(fields.get("$"))
1210
doc = cls(**json_fields)
1211
else:
1212
doc = cls(**fields)
0 commit comments