Remove Org.created_at to maintain compatibility with old versions (the field was not being used).

This commit is contained in:
2026-01-28 01:31:35 +00:00
parent aa58f08bc5
commit b08cca754f
2 changed files with 5 additions and 19 deletions
+3 -12
View File
@@ -84,15 +84,9 @@ class Role(msgspec.Struct, dict=True, omit_defaults=True):
class Org(msgspec.Struct, dict=True):
"""Organization data structure.
Mutable fields: display_name
Immutable fields: created_at (set at creation, never modified)
uuid is derived from created_at using uuid7.
"""
"""Organization data structure."""
display_name: str
created_at: datetime
def __post_init__(self):
self.uuid: UUID = _UUID_UNSET # Convenience field, not serialized
@@ -100,11 +94,8 @@ class Org(msgspec.Struct, dict=True):
@classmethod
def create(cls, display_name: str) -> "Org":
"""Create a new Org with auto-generated uuid7."""
org = cls(
display_name=display_name,
created_at=datetime.now(timezone.utc),
)
org.uuid = uuid7.create(org.created_at)
org = cls(display_name=display_name)
org.uuid = uuid7.create()
return org