fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move initial_data to a migration
[redakcja.git]
/
apps
/
catalogue
/
models
/
book.py
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
1b043a4
..
db52128
100755
(executable)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-99,7
+99,7
@@
class Book(models.Model):
# if there are more parts, set the rest to empty strings
book_len = len(instance)
for i in range(book_len - len(texts)):
# if there are more parts, set the rest to empty strings
book_len = len(instance)
for i in range(book_len - len(texts)):
- texts.append(
u'pusta część %d' % (i + 1), u''
)
+ texts.append(
(u'pusta część %d' % (i + 1), u'')
)
i = 0
for i, (title, text) in enumerate(texts):
i = 0
for i, (title, text) in enumerate(texts):
@@
-110,8
+110,8
@@
class Book(models.Model):
if i < book_len:
chunk = instance[i]
if i < book_len:
chunk = instance[i]
- chunk.slug = slug
- chunk.title = title
+ chunk.slug = slug
[:50]
+ chunk.title = title
[:255]
chunk.save()
else:
chunk = instance.add(slug, title, adjust_slug=True)
chunk.save()
else:
chunk = instance.add(slug, title, adjust_slug=True)