mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
Merge pull request #3182 from bookwyrm-social/broken-migration
Removes part of migration causing upgrade issues
This commit is contained in:
commit
addfee0607
1 changed files with 0 additions and 14 deletions
|
@ -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
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue