Merge pull request #3182 from bookwyrm-social/broken-migration

Removes part of migration causing upgrade issues
This commit is contained in:
Mouse Reeve 2024-01-02 10:50:35 -08:00 committed by GitHub
commit addfee0607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,17 +22,6 @@ def update_deleted_users(apps, schema_editor):
).update(is_deleted=True)
def erase_deleted_user_data(apps, schema_editor):
"""Retroactively clear user data"""
for user in User.objects.filter(is_deleted=True):
user.erase_user_data()
user.save(
broadcast=False,
update_fields=["email", "avatar", "preview_image", "summary", "name"],
)
user.erase_user_statuses(broadcast=False)
class Migration(migrations.Migration):
dependencies = [
@ -43,7 +32,4 @@ class Migration(migrations.Migration):
migrations.RunPython(
update_deleted_users, reverse_code=migrations.RunPython.noop
),
migrations.RunPython(
erase_deleted_user_data, reverse_code=migrations.RunPython.noop
),
]