From a6a9f7eb10a7768bffaf2bc9774dcf5ce9a6db9c Mon Sep 17 00:00:00 2001 From: Stefan Fleckenstein Date: Wed, 1 Dec 2021 07:51:37 +0100 Subject: [PATCH] fixes for typos --- dojo/api_v2/permissions.py | 4 ++-- dojo/api_v2/serializers.py | 4 ++-- dojo/forms.py | 2 +- dojo/importers/reimporter/utils.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dojo/api_v2/permissions.py b/dojo/api_v2/permissions.py index 6e1c252541..797ac02ece 100644 --- a/dojo/api_v2/permissions.py +++ b/dojo/api_v2/permissions.py @@ -2,7 +2,7 @@ from rest_framework.exceptions import ParseError from dojo.api_v2.serializers import get_import_meta_data_from_dict, get_product_id_from_dict from dojo.importers.reimporter.utils import get_target_engagement_if_exists, \ - get_target_product_if_exists, get_target_test_if_exists, get_target_product_by_id_if_exsits + get_target_product_if_exists, get_target_test_if_exists, get_target_product_by_id_if_exists from dojo.models import Endpoint, Engagement, Finding, Product_Type, Product, Test, Dojo_Group from django.shortcuts import get_object_or_404 from rest_framework import permissions, serializers @@ -198,7 +198,7 @@ def has_permission(self, request, view): product = get_target_product_if_exists(product_name) if not product: product_id = get_product_id_from_dict(request.data) - product = get_target_product_by_id_if_exsits(product_id) + product = get_target_product_by_id_if_exists(product_id) if product: # existing product, nothing special to check diff --git a/dojo/api_v2/serializers.py b/dojo/api_v2/serializers.py index f1c3ee66ed..718be74a41 100644 --- a/dojo/api_v2/serializers.py +++ b/dojo/api_v2/serializers.py @@ -5,7 +5,7 @@ from dojo.endpoint.utils import endpoint_filter from dojo.importers.reimporter.utils import get_target_engagement_if_exists, \ - get_target_product_if_exists, get_target_test_if_exists, get_target_product_by_id_if_exsits + get_target_product_if_exists, get_target_test_if_exists, get_target_product_by_id_if_exists from dojo.models import Dojo_User, Finding_Group, Product, Engagement, Test, Finding, \ User, Stub_Finding, Risk_Acceptance, \ Finding_Template, Test_Type, Development_Environment, NoteHistory, \ @@ -1484,7 +1484,7 @@ def save(self): product = get_target_product_if_exists(product_name) if not product: product_id = get_product_id_from_dict(data) - product = get_target_product_by_id_if_exsits(product_id) + product = get_target_product_by_id_if_exists(product_id) try: endpoint_meta_import(file, product, create_endpoints, create_tags, create_dojo_meta, origin='API') except SyntaxError as se: diff --git a/dojo/forms.py b/dojo/forms.py index 69fc963444..3e43f399bd 100755 --- a/dojo/forms.py +++ b/dojo/forms.py @@ -525,7 +525,7 @@ class ImportEndpointMetaForm(forms.Form): label="Choose meta file", required=True) # Could not get required=True to actually accept the file as present create_endpoints = forms.BooleanField( - label="Create nonexsitng Endpoint", + label="Create nonexisting Endpoint", initial=True, required=False, help_text="Create endpoints that do not already exist",) diff --git a/dojo/importers/reimporter/utils.py b/dojo/importers/reimporter/utils.py index e34e56bf77..62a0997614 100644 --- a/dojo/importers/reimporter/utils.py +++ b/dojo/importers/reimporter/utils.py @@ -89,7 +89,7 @@ def get_target_product_if_exists(product_name=None): return None -def get_target_product_by_id_if_exsits(product_id=None): +def get_target_product_by_id_if_exists(product_id=None): product = None if product_id: product = get_object_or_none(Product, pk=product_id)