mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-06-02 21:39:23 +00:00
26 lines
638 B
Python
26 lines
638 B
Python
# Generated by Django 3.2.20 on 2023-11-05 16:07
|
|
|
|
from django.db import migrations
|
|
from bookwyrm.models import User
|
|
|
|
|
|
def erase_deleted_user_data(apps, schema_editor):
|
|
"""Retroactively clear user data"""
|
|
for user in User.get_permanently_deleted_users():
|
|
user.erase_user_data()
|
|
user.save(broadcast=False)
|
|
user.erase_user_statuses(broadcast=False)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("bookwyrm", "0182_auto_20231027_1122"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(
|
|
erase_deleted_user_data, reverse_code=migrations.RunPython.noop
|
|
)
|
|
]
|