1
0
mirror of https://github.com/enpaul/keyosk.git synced 2024-12-26 01:33:33 +00:00

!fixup refactor serializers

This commit is contained in:
Ethan Paul 2020-03-08 23:41:42 -04:00
parent b3db6c0b33
commit ce3e2e34ab
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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()