Skip to content

Commit 2ffe455

Browse files
committed
Use id and repo in Vulnerability unique_together
Signed-off-by: Keshav Priyadarshi <[email protected]>
1 parent cb6cc5d commit 2ffe455

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 5.1.2 on 2024-12-26 09:14
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("fedcode", "0003_remove_package_local_remove_person_local_and_more"),
10+
]
11+
12+
operations = [
13+
migrations.AlterUniqueTogether(
14+
name="vulnerability",
15+
unique_together={("id", "repo")},
16+
),
17+
]

fedcode/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ class Vulnerability(models.Model):
604604
)
605605

606606
class Meta:
607-
unique_together = [["repo"]]
607+
unique_together = ('id', 'repo')
608608

609609
@property
610610
def absolute_url(self):

0 commit comments

Comments
 (0)