fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d619a6f
)
mark all chunks as final
author
Jan Szejko
<janek37@gmail.com>
Mon, 16 Oct 2017 09:27:57 +0000
(11:27 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Mon, 16 Oct 2017 09:27:57 +0000
(11:27 +0200)
apps/catalogue/management/commands/mark_final.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/management/commands/mark_final.py
b/apps/catalogue/management/commands/mark_final.py
index
5fe025e
..
cdfaab9
100644
(file)
--- a/
apps/catalogue/management/commands/mark_final.py
+++ b/
apps/catalogue/management/commands/mark_final.py
@@
-7,7
+7,6
@@
import sys
from django.contrib.auth.models import User
from optparse import make_option
from django.contrib.auth.models import User
from optparse import make_option
-from collections import defaultdict
from django.core.management import BaseCommand
from catalogue.models import Book, Chunk
from django.core.management import BaseCommand
from catalogue.models import Book, Chunk
@@
-39,13
+38,13
@@
class Command(BaseCommand):
for book in books:
print 'processing %s' % book.slug
for book in books:
print 'processing %s' % book.slug
- chunk = book.chunk_set.first()
- src = chunk.head.materialize()
- chunk.commit(
- text=src,
- author=user,
- description=u'Ostateczna akceptacja merytoryczna przez kierownika literackiego.',
- tags=[Chunk.tag_model.objects.get(slug='editor-proofreading')],
- publishable=True
- )
+ for chunk in book.chunk_set.all():
+
src = chunk.head.materialize()
+
chunk.commit(
+
text=src,
+
author=user,
+
description=u'Ostateczna akceptacja merytoryczna przez kierownika literackiego.',
+
tags=[Chunk.tag_model.objects.get(slug='editor-proofreading')],
+
publishable=True
+
)
print 'committed %s' % book.slug
print 'committed %s' % book.slug