bypass unicity checks, to un-break admin interface
[matthijs/upstream/django-ldapdb.git] / ldapdb / models / base.py
index f0ed7468a23f60fde79eb5cf2bc12481d605400f..bc6ca92e8c34e1a57a0ae046e3183669927d7ca9 100644 (file)
@@ -68,6 +68,7 @@ class Model(django.db.models.base.Model):
 
     # meta-data
     base_dn = None
+    search_scope = ldap.SCOPE_SUBTREE
     object_classes = ['top']
 
     def __init__(self, *args, **kwargs):
@@ -160,6 +161,11 @@ class Model(django.db.models.base.Model):
         self.saved_pk = self.pk
         signals.post_save.send(sender=self.__class__, instance=self, created=(not record_exists))
 
+    def validate_unique(self, exclude=None):
+        # FIXME: we are bypassing the unicity checks, as they break
+        # the admin interface
+        pass
+
     @classmethod
     def scoped(base_class, base_dn):
         """