From c0a28c14806197b901b6180aabfee3eb373961ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Sun, 7 Apr 2024 16:51:55 +0200 Subject: [PATCH] refactor: set default values for core models --- canaille/backends/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/canaille/backends/models.py b/canaille/backends/models.py index 816ea2a6..75bcfa41 100644 --- a/canaille/backends/models.py +++ b/canaille/backends/models.py @@ -14,7 +14,7 @@ class Model: It details all the common attributes shared by every models. """ - id: Optional[str] + id: Optional[str] = None """A unique identifier for a SCIM resource as defined by the service provider. Id will be :py:data:`None` until the :meth:`~canaille.backends.models.BackendModel.save` method is called. @@ -32,11 +32,11 @@ class Model: Section 9 for additional considerations regarding privacy. """ - created: Optional[datetime.datetime] + created: Optional[datetime.datetime] = None """The :class:`~datetime.datetime` that the resource was added to the service provider.""" - last_modified: Optional[datetime.datetime] + last_modified: Optional[datetime.datetime] = None """The most recent :class:`~datetime.datetime` that the details of this resource were updated at the service provider.