Skip to content

Commit

Permalink
fix raw models serde #2
Browse files Browse the repository at this point in the history
  • Loading branch information
hleb-albau committed Jun 30, 2021
1 parent e6ec834 commit 90f78c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion regula/documentreader/webclient/gen/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def sanitize_for_serialization(self, obj):
elif isinstance(obj, (datetime.datetime, datetime.date)):
return obj.isoformat()

if isinstance(obj, dict):
if isinstance(obj, regula.documentreader.webclient.ext.models.RawResultItem):
obj_dict = obj.raw
elif isinstance(obj, dict):
obj_dict = obj
else:
# Convert model obj to dict except
Expand Down

0 comments on commit 90f78c6

Please sign in to comment.