You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
531 B

  1. # Generated by Django 3.2.2 on 2021-05-24 07:38
  2. from django.db import migrations
  3. def fill_reports_field(apps, schema_editor):
  4. Profile = apps.get_model("accounts", "Profile")
  5. Profile.objects.filter(reports_allowed=False).update(reports="off")
  6. Profile.objects.filter(reports_allowed=True).update(reports="monthly")
  7. class Migration(migrations.Migration):
  8. dependencies = [
  9. ("accounts", "0035_profile_reports"),
  10. ]
  11. operations = [migrations.RunPython(fill_reports_field, migrations.RunPython.noop)]