Pictures: leave raw models for archiving.
[wolnelektury.git] / src / catalogue / models / book.py
index 9e0ec50..ac8c02b 100644 (file)
@@ -91,7 +91,7 @@ class Book(models.Model):
     tagged = managers.ModelTaggedItemManager(Tag)
     tags = managers.TagDescriptor(Tag)
     tag_relations = GenericRelation(Tag.intermediary_table_model)
-    translators = models.ManyToManyField(Tag)
+    translators = models.ManyToManyField(Tag, blank=True)
 
     html_built = django.dispatch.Signal()
     published = django.dispatch.Signal()
@@ -414,7 +414,7 @@ class Book(models.Model):
     has_daisy_file.boolean = True
 
     def has_sync_file(self):
-        return self.has_media("sync")
+        return settings.FEATURE_SYNCHRO and self.has_media("sync")
 
     def get_sync(self):
         with self.get_media('sync').first().file.open('r') as f: