Skip to content

Commit

Permalink
fix: json uuid encoder (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMohammad20000 authored Jan 7, 2025
1 parent 843e61a commit 4c6d4db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/utils/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from datetime import datetime as dt
import json
from datetime import datetime as dt
from uuid import UUID


Expand All @@ -19,5 +19,5 @@ class UUIDEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, UUID):
# if the obj is uuid, we simply return the value of uuid
return obj.hex
return json.JSONEncoder.default(self, obj)
return str(obj)
return super().default(self, obj)

0 comments on commit 4c6d4db

Please sign in to comment.