Skip to content

Commit

Permalink
fix: message sorting in playground (#3293)
Browse files Browse the repository at this point in the history
  • Loading branch information
italojohnny authored Aug 12, 2024
1 parent a00bbe0 commit 7a93a70
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import TYPE_CHECKING, Optional
from uuid import UUID, uuid4

from pydantic import field_validator, BaseModel
from pydantic import field_serializer, field_validator, BaseModel
from sqlmodel import JSON, Column, Field, Relationship, SQLModel


Expand Down Expand Up @@ -32,6 +32,13 @@ def validate_flow_id(cls, value):
value = UUID(value)
return value

@field_serializer("timestamp")
@classmethod
def serialize_timestamp(cls, value):
if value.tzinfo is None:
value = value.replace(tzinfo=timezone.utc)
return value


class VertexBuildTable(VertexBuildBase, table=True): # type: ignore
__tablename__ = "vertex_build"
Expand Down

0 comments on commit 7a93a70

Please sign in to comment.