fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add command to import legacy lessons
[redakcja.git]
/
apps
/
catalogue
/
models
/
book.py
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
7589587
..
5990428
100755
(executable)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-92,10
+92,10
@@
class Book(models.Model):
@classmethod
@transaction.commit_on_success
@classmethod
@transaction.commit_on_success
- def create(cls, creator, text, **kwargs):
+ def create(cls, creator, text,
commit_args=None,
**kwargs):
b = cls.objects.create(**kwargs)
b.chunk_set.all().update(creator=creator)
b = cls.objects.create(**kwargs)
b.chunk_set.all().update(creator=creator)
- b[0].commit(text, author=creator)
+ b[0].commit(text, author=creator
, **(commit_args or {})
)
return b
def add(self, *args, **kwargs):
return b
def add(self, *args, **kwargs):