From cb6cc5de994849bfa22ff70095dbbad93d6966c8 Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Thu, 26 Dec 2024 18:31:41 +0530 Subject: [PATCH 1/2] Fix typos in placeholder Signed-off-by: Keshav Priyadarshi --- fedcode/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fedcode/forms.py b/fedcode/forms.py index d654c30..908c882 100644 --- a/fedcode/forms.py +++ b/fedcode/forms.py @@ -109,7 +109,7 @@ class SearchPackageForm(forms.Form): label=False, widget=forms.TextInput( attrs={ - "placeholder": "Please entre a valid purl ex: pkg:maven/org.apache.commons/io@1.3.4", + "placeholder": "Please enter a valid purl ex: pkg:maven/org.apache.commons/io", "class": "input is-rounded", "style": "width: 90%;", }, @@ -123,7 +123,7 @@ class SearchReviewForm(forms.Form): label=False, widget=forms.TextInput( attrs={ - "placeholder": "Please Entre a valid Review Name", + "placeholder": "Please Enter a valid Review Name", "class": "input is-rounded", "style": "width: 90%;", }, @@ -137,7 +137,7 @@ class SearchRepositoryForm(forms.Form): label=False, widget=forms.TextInput( attrs={ - "placeholder": "Please Entre a Repository URL ex: https://github.com/nexB/vulnerablecode-data", + "placeholder": "Please Enter a Repository URL ex: https://github.com/nexB/vulnerablecode-data", "class": "input is-rounded", "style": "width: 90%;", }, From 2ffe45553f9c730053e95e10707a95e655ed3c2a Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Thu, 26 Dec 2024 18:32:31 +0530 Subject: [PATCH 2/2] Use id and repo in Vulnerability unique_together Signed-off-by: Keshav Priyadarshi --- .../0004_alter_vulnerability_unique_together.py | 17 +++++++++++++++++ fedcode/models.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 fedcode/migrations/0004_alter_vulnerability_unique_together.py diff --git a/fedcode/migrations/0004_alter_vulnerability_unique_together.py b/fedcode/migrations/0004_alter_vulnerability_unique_together.py new file mode 100644 index 0000000..d38d444 --- /dev/null +++ b/fedcode/migrations/0004_alter_vulnerability_unique_together.py @@ -0,0 +1,17 @@ +# Generated by Django 5.1.2 on 2024-12-26 09:14 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("fedcode", "0003_remove_package_local_remove_person_local_and_more"), + ] + + operations = [ + migrations.AlterUniqueTogether( + name="vulnerability", + unique_together={("id", "repo")}, + ), + ] diff --git a/fedcode/models.py b/fedcode/models.py index 1803adb..2350714 100644 --- a/fedcode/models.py +++ b/fedcode/models.py @@ -604,7 +604,7 @@ class Vulnerability(models.Model): ) class Meta: - unique_together = [["repo"]] + unique_together = ('id', 'repo') @property def absolute_url(self):