circular import issues and added_by migration

This commit is contained in:
Mouse Reeve
2021-02-04 14:27:26 -08:00
parent 5a3a6151a6
commit 7381536ad6
19 changed files with 273 additions and 265 deletions

View File

@ -49,7 +49,7 @@ class Shelf(View):
return ActivitypubResponse(shelf.to_activity(**request.GET))
books = models.ShelfBook.objects.filter(
added_by=user, shelf=shelf
user=user, shelf=shelf
).order_by('-updated_date').all()
data = {
@ -136,7 +136,7 @@ def shelve(request):
# this just means it isn't currently on the user's shelves
pass
models.ShelfBook.objects.create(
book=book, shelf=desired_shelf, added_by=request.user)
book=book, shelf=desired_shelf, user=request.user)
# post about "want to read" shelves
if desired_shelf.identifier == 'to-read':