Skip to content

Commit

Permalink
Handle UUIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
sidpan1 committed Aug 1, 2024
1 parent 5f6494c commit e564200
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions onelens_backend_client_v2/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
""" # noqa: E501

import datetime
import uuid
from dateutil.parser import parse
from enum import Enum
import json
Expand Down Expand Up @@ -347,6 +348,8 @@ def sanitize_for_serialization(self, obj):

elif isinstance(obj, dict):
obj_dict = obj
elif isinstance(obj, uuid.UUID):
return str(obj)
else:
# Convert model obj to dict except
# attributes `openapi_types`, `attribute_map`
Expand Down

0 comments on commit e564200

Please sign in to comment.