mirror of
https://github.com/enpaul/keyosk.git
synced 2024-11-24 23:47:49 +00:00
!fixup refactor serializers
This commit is contained in:
parent
b3db6c0b33
commit
ce3e2e34ab
@ -46,7 +46,7 @@ class AccountSerializer(msh.Schema):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def update(cls, uuid: Union[str, uuid.UUID], data: Dict[str, Any]) -> KeyoskAccount:
|
||||
def update(cls, uuid: Union[str, UUID], data: Dict[str, Any]) -> KeyoskAccount:
|
||||
data.update({"uuid": UUID(str(uuid))})
|
||||
loaded = cls(exclude=["created", "updated"]).load(data)
|
||||
loaded.updated = datetime.datetime.utcnow()
|
||||
|
@ -140,7 +140,7 @@ class DomainSerializer(msh.Schema):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def update(cls, uuid: Union[str, uuid.UUID], data: Dict[str, Any]) -> KeyoskDomain:
|
||||
def update(cls, uuid: Union[str, UUID], data: Dict[str, Any]) -> KeyoskDomain:
|
||||
data.update({"uuid": UUID(str(uuid))})
|
||||
loaded = cls(exclude=["created", "updated"]).load(data)
|
||||
loaded.updated = datetime.datetime.utcnow()
|
||||
|
Loading…
Reference in New Issue
Block a user