From 816670c38cab3c6d3576bfa80d6aceae6de69fea Mon Sep 17 00:00:00 2001 From: Rohan Date: Thu, 24 Oct 2024 18:48:58 +0530 Subject: [PATCH] fix: related name for service accounts app fk --- .../0087_alter_serviceaccount_apps.py | 18 ++++++++++++++++++ backend/api/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 backend/api/migrations/0087_alter_serviceaccount_apps.py diff --git a/backend/api/migrations/0087_alter_serviceaccount_apps.py b/backend/api/migrations/0087_alter_serviceaccount_apps.py new file mode 100644 index 000000000..5441358d6 --- /dev/null +++ b/backend/api/migrations/0087_alter_serviceaccount_apps.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.15 on 2024-10-24 12:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0086_remove_servicetoken_service_account_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='serviceaccount', + name='apps', + field=models.ManyToManyField(related_name='service_accounts', to='api.app'), + ), + ] diff --git a/backend/api/models.py b/backend/api/models.py index f8f532213..57e5611d0 100644 --- a/backend/api/models.py +++ b/backend/api/models.py @@ -225,7 +225,7 @@ class ServiceAccount(models.Model): null=True, blank=True, ) - apps = models.ManyToManyField(App, related_name="apps") + apps = models.ManyToManyField(App, related_name="service_accounts") identity_key = models.CharField(max_length=256, null=True, blank=True) server_wrapped_keyring = models.TextField(null=True) server_wrapped_recovery = models.TextField(null=True)