normalize whitespace for app
[wolnelektury.git] / src / catalogue / models / book.py
index b2148e6..35ca3c1 100644 (file)
@@ -473,6 +473,8 @@ class Book(models.Model):
 
     
     def get_sync(self):
+        if not self.has_sync_file():
+            return '[]'
         with self.get_media('sync').first().file.open('r') as f:
             sync = f.read().split('\n')
         offset = float(sync[0])