refactor: Move __html__ from BackendModel to Model

This commit is contained in:
Éloi Rivard 2024-04-16 22:02:47 +02:00
parent b2d5f8d3a1
commit 6ff591b91c
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184

View file

@ -70,6 +70,9 @@ class Model:
}
return cls._attributes
def __html__(self):
return self.id
@property
def identifier(self):
"""Returns a unique value that will be used to identify the model
@ -137,6 +140,3 @@ class BackendModel:
getattr(self, attribute) and value in getattr(self, attribute)
for attribute, value in filter.items()
)
def __html__(self):
return self.id