diff --git a/bookwyrm/migrations/0134_alter_stopped_reading.py b/bookwyrm/migrations/0134_alter_stopped_reading.py index 13c02e99..ba49f612 100644 --- a/bookwyrm/migrations/0134_alter_stopped_reading.py +++ b/bookwyrm/migrations/0134_alter_stopped_reading.py @@ -1,7 +1,8 @@ # Generated by Django 3.2.11 on 2022-02-11 13:19 -import bookwyrm.models.fields from django.db import migrations +import bookwyrm.models.fields +from bookwyrm.models import Shelf def add_shelves(apps, schema_editor): @@ -13,12 +14,14 @@ def add_shelves(apps, schema_editor): users = apps.get_model("bookwyrm", "User") local_users = users.objects.using(db_alias).filter(local=True) for user in local_users: - shelf_model.using(db_alias)( + remote_id = f"{user.remote_id}/books/stopped" + shelf_model.objects.using(db_alias).create( name="Stopped reading", identifier=Shelf.STOPPED_READING, user=user, editable=False, - ).save(broadcast=False) + remote_id=remote_id, + ) class Migration(migrations.Migration):