Fix Bug: The 'content' attribute has no file associated with it.

Brightcells vor 7 Jahren
Ursprung
Commit
3274071b85
1 geänderte Dateien mit 2 neuen Zeilen und 0 gelöschten Zeilen
  1. 2 0
      intro/admin.py

+ 2 - 0
intro/admin.py

@@ -47,6 +47,8 @@ class IntroCatalogInfoAdmin(admin.ModelAdmin):
47 47
 
48 48
                 content = ''
49 49
                 while True:
50
+                    if not obj.content:
51
+                        break
50 52
                     tmpLine = obj.content.readline()
51 53
                     if tmpLine == '' or tmpLine == os.linesep:
52 54
                         break