diff -r 205804d9f142 -r 91c44b3fd11f src/hdalab/models/dataviz.py --- a/src/hdalab/models/dataviz.py Thu Nov 13 16:07:22 2014 +0100 +++ b/src/hdalab/models/dataviz.py Fri Nov 14 03:07:20 2014 +0100 @@ -4,8 +4,10 @@ @author: ymh ''' +from hdabo.models import Tag, Datasheet +from hdalab import fields + from django.db import models -from hdabo.models import Tag, Datasheet class TagYears(models.Model): @@ -44,7 +46,7 @@ class DbpediaFields(models.Model): dbpedia_uri = models.URLField(max_length=2048, blank=False, null=False, db_index=True, unique=False) - tag = models.OneToOneField(Tag, blank=True, null=True, db_index=True, related_name="dbpedia_fields") + tag = fields.OneToOneField(Tag, blank=True, null=True, db_index=True, related_name="dbpedia_fields", related_default=lambda instance: None) abstract = models.TextField(blank=True, null=True) thumbnail = models.URLField(max_length=2048, blank=True, null=True, db_index=False) label = models.CharField(max_length=2048, unique=False, blank=True, null=True)