X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=plomtask%2Fdb.py;fp=plomtask%2Fdb.py;h=71c59d50d8b0013dcf3bd9e6c811080563606830;hb=244270eed71df45faf9554d0666b816be9876f77;hp=e95c27d52133ed16d448f221f9f6df89efd25fde;hpb=5a393ec6a77d8f1040763ffa3e9e908f38a0e517;p=plomtask
diff --git a/plomtask/db.py b/plomtask/db.py
index e95c27d..71c59d5 100644
--- a/plomtask/db.py
+++ b/plomtask/db.py
@@ -330,6 +330,11 @@ class BaseModel(Generic[BaseModelId]):
assert isinstance(as_dict['id'], (int, str))
return as_dict['id']
+ @classmethod
+ def name_lowercase(cls) -> str:
+ """Convenience method to return cls' name in lowercase."""
+ return cls.__name__.lower()
+
# cache management
# (we primarily use the cache to ensure we work on the same object in
# memory no matter where and how we retrieve it, e.g. we don't want