Skip to content

Commit 79a9ea6

Browse files
authored
Merge branch 'DefectDojo:bugfix' into bugfix
2 parents 374c5b7 + 604f109 commit 79a9ea6

3 files changed

Lines changed: 5 additions & 24 deletions

File tree

dojo/forms.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,6 @@ class ProductForm(forms.ModelForm):
342342
product_manager = forms.ModelChoiceField(queryset=Dojo_User.objects.exclude(is_active=False).order_by("first_name", "last_name"), required=False)
343343
technical_contact = forms.ModelChoiceField(queryset=Dojo_User.objects.exclude(is_active=False).order_by("first_name", "last_name"), required=False)
344344
team_manager = forms.ModelChoiceField(queryset=Dojo_User.objects.exclude(is_active=False).order_by("first_name", "last_name"), required=False)
345-
tags = TagField(
346-
required=False,
347-
help_text="Add tags that help describe this product. Choose from the list or add new tags. Press Enter key to add.",
348-
)
349345

350346
def __init__(self, *args, **kwargs):
351347
super().__init__(*args, **kwargs)
@@ -1017,10 +1013,6 @@ class EngForm(forms.ModelForm):
10171013
queryset=None,
10181014
required=True, label="Testing Lead")
10191015
test_strategy = forms.URLField(required=False, label="Test Strategy URL")
1020-
tags = TagField(
1021-
required=False,
1022-
help_text="Add tags that help describe this engagement. Choose from the list or add new tags. Press Enter key to add.",
1023-
)
10241016

10251017
def __init__(self, *args, **kwargs):
10261018
cicd = False
@@ -1103,10 +1095,6 @@ class TestForm(forms.ModelForm):
11031095
lead = forms.ModelChoiceField(
11041096
queryset=None,
11051097
required=False, label="Testing Lead")
1106-
tags = TagField(
1107-
required=False,
1108-
help_text="Add tags that help describe this test. Choose from the list or add new tags. Press Enter key to add.",
1109-
)
11101098

11111099
def __init__(self, *args, **kwargs):
11121100
obj = None
@@ -1463,10 +1451,6 @@ class FindingForm(forms.ModelForm):
14631451
choices=EFFORT_FOR_FIXING_CHOICES,
14641452
error_messages={
14651453
"invalid_choice": EFFORT_FOR_FIXING_INVALID_CHOICE})
1466-
tags = TagField(
1467-
required=False,
1468-
help_text="Add tags that help describe this finding. Choose from the list or add new tags. Press Enter key to add.",
1469-
)
14701454

14711455
# the only reliable way without hacking internal fields to get predicatble ordering is to make it explicit
14721456
field_order = ("title", "group", "date", "sla_start_date", "sla_expiration_date", "cwe", "vulnerability_ids", "severity", "cvss_info", "cvssv3",
@@ -1738,11 +1722,6 @@ class Meta:
17381722

17391723

17401724
class EditEndpointForm(forms.ModelForm):
1741-
tags = TagField(
1742-
required=False,
1743-
help_text="Add tags that help describe this endpoint. Choose from the list or add new tags. Press Enter key to add.",
1744-
)
1745-
17461725
class Meta:
17471726
model = Endpoint
17481727
exclude = ["product", "inherited_tags"]

dojo/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,8 @@ def calculate_grade(product, *args, **kwargs):
16041604
product.prod_numeric_grade = prod_numeric_grade
16051605
super(Product, product).save()
16061606
else:
1607-
logger.debug("Product %s grade %i is up to date", product.id, prod_numeric_grade)
1607+
# Use %s to safely handle None grades without formatter errors
1608+
logger.debug("Product %s grade %s is up to date", product.id, prod_numeric_grade)
16081609

16091610

16101611
def get_celery_worker_status():

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ django-dbbackup==4.3.0
1010
django-environ==0.12.0
1111
django-filter==25.1
1212
django-imagekit==5.0.0
13-
django-multiselectfield==0.1.13
13+
django-multiselectfield==1.0.1
1414
django-polymorphic==4.1.0
1515
django-crispy-forms==2.4
1616
django_extensions==4.1
@@ -55,7 +55,8 @@ django-debug-toolbar==5.2.0
5555
django-debug-toolbar-request-history==0.1.4
5656
vcrpy==7.0.0
5757
vcrpy-unittest==0.1.7
58-
django-tagulous==2.1.1
58+
# do not upgrade to 2.1.1 - https://github.com/DefectDojo/django-DefectDojo/issues/12918
59+
django-tagulous==2.1.0
5960
PyJWT==2.10.1
6061
cvss==3.6
6162
django-fieldsignals==0.7.0

0 commit comments

Comments
 (0)