1
0
Fork 0

Adds helper function for loading editions

This commit is contained in:
Mouse Reeve 2020-05-10 18:08:18 -07:00
parent e11e1cc560
commit d8aadb4587
4 changed files with 14 additions and 8 deletions

View file

@ -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)