diff options
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 2ed6b28c5..89e56a312 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1002,6 +1002,8 @@ def get_model_fields(model):  def import_class(full_path_classname):      mods = full_path_classname.split('.') +    if len(mods) == 1: +        mods = ['ishtar_common', 'models', mods[0]]      module = import_module('.'.join(mods[:-1]))      return getattr(module, mods[-1]) @@ -1210,7 +1212,7 @@ class TargetKey(models.Model):      is_set = models.BooleanField(_(u"Is set"), default=False)      class Meta: -        unique_together = ('target', 'value') +        unique_together = ('target', 'key')      def __unicode__(self):          return u" - ".join([unicode(self.target), self.key[:50]]) | 
