forked from Github-Mirrors/canaille
refactor: Move __html__ from BackendModel to Model
This commit is contained in:
parent
b2d5f8d3a1
commit
6ff591b91c
1 changed files with 3 additions and 3 deletions
|
@ -70,6 +70,9 @@ class Model:
|
||||||
}
|
}
|
||||||
return cls._attributes
|
return cls._attributes
|
||||||
|
|
||||||
|
def __html__(self):
|
||||||
|
return self.id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def identifier(self):
|
def identifier(self):
|
||||||
"""Returns a unique value that will be used to identify the model
|
"""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)
|
getattr(self, attribute) and value in getattr(self, attribute)
|
||||||
for attribute, value in filter.items()
|
for attribute, value in filter.items()
|
||||||
)
|
)
|
||||||
|
|
||||||
def __html__(self):
|
|
||||||
return self.id
|
|
||||||
|
|
Loading…
Reference in a new issue