summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 0eade6891..a73ba8155 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -441,6 +441,11 @@ def post_save_cache(sender, **kwargs):
sender.refresh_cache()
+class ExternalIdManager(models.Manager):
+ def get_by_natural_key(self, external_id):
+ return self.get(external_id=external_id)
+
+
class SlugModelManager(models.Manager):
def get_by_natural_key(self, slug):
return self.get(slug=slug)