From: jlaine Date: Wed, 2 Sep 2009 09:02:45 +0000 (+0000) Subject: fixup X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=bb0d161101fe9f6fde920db23482b1e1b8e7b904;p=matthijs%2Fupstream%2Fdjango-ldapdb.git fixup git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@552 e071eeec-0327-468d-9b6a-08194a12b294 --- diff --git a/ldapdb/models/base.py b/ldapdb/models/base.py index 44d495b..a0ade49 100644 --- a/ldapdb/models/base.py +++ b/ldapdb/models/base.py @@ -155,7 +155,8 @@ class Model(django.db.models.base.Model): """ import new import re - name = "%s_%s" % (base_class.__name__, re.sub('[=,]', '_', base_dn)) + suffix = re.sub('[=,]', '_', base_dn) + name = "%s_%s" % (base_class.__name__, str(suffix)) new_class = new.classobj(name, (base_class,), {'base_dn': base_dn, '__module__': base_class.__module__}) return new_class