summaryrefslogtreecommitdiff
path: root/coip/apps/link/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'coip/apps/link/models.py')
-rw-r--r--coip/apps/link/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coip/apps/link/models.py b/coip/apps/link/models.py
index b81215d..6d64dda 100644
--- a/coip/apps/link/models.py
+++ b/coip/apps/link/models.py
@@ -19,7 +19,7 @@ class Link(models.Model):
lastupdated = models.DateTimeField(auto_now=True)
class Meta:
- unique_together = ('content_type','content_id','url','tag')
+ unique_together = ('content_type','object_id','url','tag')
def __unicode__(self):
return "%s:%s (%s) on %s" % (self.tag,self.url,self.text,self.name)
@@ -28,4 +28,4 @@ class Link(models.Model):
def add_link(o,url,tag,text):
typ = ContentType.objects.get_for_model(o)
r,cr = Link.objects.get_or_create(object_id=o.id,content_type=typ,url=url,tag=tag)
- return r \ No newline at end of file
+ return r