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%;", }, 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):