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.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index e79eb4253..7514239bd 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -989,6 +989,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])
@@ -1197,7 +1199,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]])