From c1265f3b8c5d88ac3fa0de1a4b1756c6cdc9d7a2 Mon Sep 17 00:00:00 2001 From: jlaine Date: Mon, 29 Jun 2009 10:29:14 +0000 Subject: [PATCH] cleanup git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@439 e071eeec-0327-468d-9b6a-08194a12b294 --- ldapdb/models/base.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ldapdb/models/base.py b/ldapdb/models/base.py index c64e59d..9ba331e 100644 --- a/ldapdb/models/base.py +++ b/ldapdb/models/base.py @@ -33,10 +33,7 @@ class ModelBase(django.db.models.base.ModelBase): Metaclass for all LDAP models. """ def __new__(cls, name, bases, attrs): - attr_meta = attrs.get('Meta', None) - if attr_meta: - dn = attr_meta._dn - object_classes = attr_meta._object_classes + attr_meta = attrs.pop('Ldap', None) super_new = super(ModelBase, cls).__new__ new_class = super_new(cls, name, bases, attrs) @@ -48,8 +45,8 @@ class ModelBase(django.db.models.base.ModelBase): new_class._default_manager.get_query_set = get_query_set if attr_meta: - new_class._meta.dn = dn - new_class._meta.object_classes = attr_meta._object_classes + new_class._meta.dn = attr_meta.dn + new_class._meta.object_classes = attr_meta.object_classes return new_class -- 2.30.2