From 3ed79beb0e6ab10a34980d3d35f82c64920692f4 Mon Sep 17 00:00:00 2001 From: aloftus23 Date: Wed, 20 Nov 2024 16:59:42 -0500 Subject: [PATCH] Remove db_table from many_to_many relationships --- backend/src/xfd_django/xfd_api/models.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/backend/src/xfd_django/xfd_api/models.py b/backend/src/xfd_django/xfd_api/models.py index de5c69b6..267e563b 100644 --- a/backend/src/xfd_django/xfd_api/models.py +++ b/backend/src/xfd_django/xfd_api/models.py @@ -120,8 +120,7 @@ class Cve(models.Model): cpes = models.ManyToManyField( "Cpe", - related_name="cves", - db_table="cve_cpes_cpe", + related_name="cves" ) class Meta: @@ -291,8 +290,7 @@ class OrganizationTag(models.Model): name = models.CharField(max_length=255, unique=True) organizations = models.ManyToManyField( "Organization", - related_name="tags", - db_table="organization_tag_organizations_organization", + related_name="tags" ) class Meta: @@ -419,8 +417,7 @@ class Scan(models.Model): ) organizations = models.ManyToManyField( "Organization", - related_name="granularScans", - db_table="scan_organizations_organization", + related_name="granularScans" ) class Meta: @@ -452,7 +449,6 @@ class ScanTask(models.Model): organizations = models.ManyToManyField( "Organization", related_name="allScanTasks", - db_table="scan_task_organizations_organization", ) class Meta: