From 21fe72642e7b7e9847a178794a1cd9f771f23c0a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 4 Sep 2019 15:30:47 +0200 Subject: Serializers: operations - manage recordrelation filter --- ishtar_common/model_managers.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ishtar_common/model_managers.py') diff --git a/ishtar_common/model_managers.py b/ishtar_common/model_managers.py index ae0264ced..1857b2079 100644 --- a/ishtar_common/model_managers.py +++ b/ishtar_common/model_managers.py @@ -18,3 +18,8 @@ class TypeManager(Manager): class SlugModelManager(Manager): def get_by_natural_key(self, slug): return self.get(slug=slug) + + +class UUIDModelManager(Manager): + def get_by_natural_key(self, uuid): + return self.get(uuid=uuid) -- cgit v1.2.3