mirror of
https://github.com/healthchecks/healthchecks.git
synced 2024-11-23 07:57:39 +00:00
23 lines
647 B
Python
23 lines
647 B
Python
# Generated by Django 3.2.2 on 2021-05-24 07:38
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from django.apps.registry import Apps
|
|
from django.db import migrations
|
|
|
|
|
|
def fill_reports_field(apps: Apps, schema_editor: Any) -> None:
|
|
Profile = apps.get_model("accounts", "Profile")
|
|
Profile.objects.filter(reports_allowed=False).update(reports="off")
|
|
Profile.objects.filter(reports_allowed=True).update(reports="monthly")
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("accounts", "0035_profile_reports"),
|
|
]
|
|
|
|
operations = [migrations.RunPython(fill_reports_field, migrations.RunPython.noop)]
|