diff --git a/api/tacticalrmm/core/migrations/0040_customfield_hide_in_summary.py b/api/tacticalrmm/core/migrations/0040_customfield_hide_in_summary.py new file mode 100644 index 0000000000..8eeed5b561 --- /dev/null +++ b/api/tacticalrmm/core/migrations/0040_customfield_hide_in_summary.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.9 on 2024-01-28 02:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("core", "0039_coresettings_smtp_from_name"), + ] + + operations = [ + migrations.AddField( + model_name="customfield", + name="hide_in_summary", + field=models.BooleanField(default=False), + ), + ] diff --git a/api/tacticalrmm/core/migrations/0041_auto_20240128_0301.py b/api/tacticalrmm/core/migrations/0041_auto_20240128_0301.py new file mode 100644 index 0000000000..19cd50c831 --- /dev/null +++ b/api/tacticalrmm/core/migrations/0041_auto_20240128_0301.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.9 on 2024-01-28 03:01 + +from django.db import migrations + + +def update_hide_in_summary(apps, schema_editor): + CustomField = apps.get_model("core", "CustomField") + for field in CustomField.objects.filter(hide_in_ui=True): + field.hide_in_summary = True + field.save(update_fields=["hide_in_summary"]) + + +class Migration(migrations.Migration): + dependencies = [ + ("core", "0040_customfield_hide_in_summary"), + ] + + operations = [migrations.RunPython(update_hide_in_summary)] diff --git a/api/tacticalrmm/core/models.py b/api/tacticalrmm/core/models.py index 73fda494ca..63839c4d59 100644 --- a/api/tacticalrmm/core/models.py +++ b/api/tacticalrmm/core/models.py @@ -314,6 +314,7 @@ class CustomField(BaseAuditModel): default=list, ) hide_in_ui = models.BooleanField(default=False) + hide_in_summary = models.BooleanField(default=False) class Meta: unique_together = (("model", "name"),)