Skip to content

Commit

Permalink
fix: ignore created on msg flow serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
kallilsouza committed Jan 22, 2025
1 parent bf8ac05 commit 6eb13dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chats/apps/api/v1/external/msgs/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ class Meta:
]

def validate(self, attrs: dict):
if "created_on" in attrs and attrs["created_on"] is None:
# defaults to current time and date
if "created_on" in attrs:
attrs.pop("created_on")

# if "created_on" in attrs and attrs["created_on"] is None:
# # defaults to current time and date
# attrs.pop("created_on")

return super().validate(attrs)

def create(self, validated_data):
Expand Down

0 comments on commit 6eb13dc

Please sign in to comment.