Skip to content

Commit

Permalink
models:history - specify types of data
Browse files Browse the repository at this point in the history
Use JSON-serialisable types
  • Loading branch information
MatteoCampinoti94 committed Oct 10, 2023
1 parent ca42db4 commit 83eff3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions acacore/models/history.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import datetime
from typing import Any
from typing import Optional
from typing import Union

from pydantic import UUID4

Expand All @@ -10,5 +11,5 @@ class HistoryEntry(ACABase):
uuid: UUID4
time: datetime
operation: str
data: Any | None = None
reason: str | None = None
data: Optional[Union[dict, list, str, int, float, bool, datetime]] = None
reason: Optional[str] = None

0 comments on commit 83eff3f

Please sign in to comment.