Adds helper function for loading editions
This commit is contained in:
parent
e11e1cc560
commit
d8aadb4587
4 changed files with 14 additions and 8 deletions
|
@ -263,7 +263,7 @@ def handle_comment(user, book, content):
|
|||
def handle_status(user, book_id, \
|
||||
builder, fr_serializer, ap_serializer, *args):
|
||||
''' generic handler for statuses '''
|
||||
book = models.Book.objects.get(id=book_id)
|
||||
book = models.Edition.objects.get(id=book_id)
|
||||
status = builder(user, book, *args)
|
||||
|
||||
activity = fr_serializer(status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue