Only use get_or_create_book with remote_id
This commit is contained in:
parent
0f579e7d8d
commit
35ca61d7f6
7 changed files with 15 additions and 39 deletions
|
@ -7,7 +7,7 @@ from django.http import HttpResponseNotFound, JsonResponse
|
|||
from django.views.decorators.csrf import csrf_exempt
|
||||
import requests
|
||||
|
||||
from fedireads import activitypub, books_manager
|
||||
from fedireads import activitypub
|
||||
from fedireads import models
|
||||
from fedireads.broadcast import broadcast
|
||||
from fedireads.status import create_review, create_status
|
||||
|
@ -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 = books_manager.get_or_create_book(book_id)
|
||||
book = models.Book.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