Skip to content

Commit

Permalink
Revert "Remove db_table from many_to_many relationships"
Browse files Browse the repository at this point in the history
This reverts commit 3ed79be.
  • Loading branch information
aloftus23 committed Nov 20, 2024
1 parent 3ed79be commit c030fbc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions backend/src/xfd_django/xfd_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ class Cve(models.Model):

cpes = models.ManyToManyField(
"Cpe",
related_name="cves"
related_name="cves",
db_table="cve_cpes_cpe",
)

class Meta:
Expand Down Expand Up @@ -290,7 +291,8 @@ class OrganizationTag(models.Model):
name = models.CharField(max_length=255, unique=True)
organizations = models.ManyToManyField(
"Organization",
related_name="tags"
related_name="tags",
db_table="organization_tag_organizations_organization",
)

class Meta:
Expand Down Expand Up @@ -417,7 +419,8 @@ class Scan(models.Model):
)
organizations = models.ManyToManyField(
"Organization",
related_name="granularScans"
related_name="granularScans",
db_table="scan_organizations_organization",
)

class Meta:
Expand Down Expand Up @@ -449,6 +452,7 @@ class ScanTask(models.Model):
organizations = models.ManyToManyField(
"Organization",
related_name="allScanTasks",
db_table="scan_task_organizations_organization",
)

class Meta:
Expand Down

0 comments on commit c030fbc

Please sign in to comment.