Skip to content

Commit 8869737

Browse files
authored
Merge pull request #13912 from DefectDojo/master-into-dev/2.53.3-2.54.0-dev
Release: Merge back 2.53.3 into dev from: master-into-dev/2.53.3-2.54.0-dev
2 parents a4ed58f + fcd0b4a commit 8869737

3 files changed

Lines changed: 22 additions & 24 deletions

File tree

dojo/utils.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,20 +2016,20 @@ class async_delete:
20162016
def __init__(self, *args, **kwargs):
20172017
self.mapping = {
20182018
"Product_Type": [
2019-
(Endpoint, "product__prod_type"),
2020-
(Finding, "test__engagement__product__prod_type"),
2021-
(Test, "engagement__product__prod_type"),
2022-
(Engagement, "product__prod_type"),
2023-
(Product, "prod_type")],
2019+
(Endpoint, "product__prod_type__id"),
2020+
(Finding, "test__engagement__product__prod_type__id"),
2021+
(Test, "engagement__product__prod_type__id"),
2022+
(Engagement, "product__prod_type__id"),
2023+
(Product, "prod_type__id")],
20242024
"Product": [
2025-
(Endpoint, "product"),
2026-
(Finding, "test__engagement__product"),
2027-
(Test, "engagement__product"),
2028-
(Engagement, "product")],
2025+
(Endpoint, "product__id"),
2026+
(Finding, "test__engagement__product__id"),
2027+
(Test, "engagement__product__id"),
2028+
(Engagement, "product__id")],
20292029
"Engagement": [
2030-
(Finding, "test__engagement"),
2031-
(Test, "engagement")],
2032-
"Test": [(Finding, "test")],
2030+
(Finding, "test__engagement__id"),
2031+
(Test, "engagement__id")],
2032+
"Test": [(Finding, "test__id")],
20332033
}
20342034

20352035
@dojo_async_task
@@ -2098,11 +2098,11 @@ def delete(self, obj, **kwargs):
20982098
@app.task
20992099
def crawl(self, obj, model_list, **kwargs):
21002100
logger.debug("ASYNC_DELETE: Crawling " + self.get_object_name(obj) + ": " + str(obj))
2101-
task_results = []
21022101
for model_info in model_list:
2102+
task_results = []
21032103
model = model_info[0]
21042104
model_query = model_info[1]
2105-
filter_dict = {model_query: obj}
2105+
filter_dict = {model_query: obj.id}
21062106
# Only fetch the IDs since we will make a list of IDs in the following function call
21072107
objects_to_delete = model.objects.only("id").filter(**filter_dict).distinct().order_by("id")
21082108
logger.debug("ASYNC_DELETE: Deleting " + str(len(objects_to_delete)) + " " + self.get_object_name(model) + "s in chunks")
@@ -2116,11 +2116,11 @@ def crawl(self, obj, model_list, **kwargs):
21162116
# Wait for all chunk deletions to complete (they run in parallel)
21172117
for task_result in task_results:
21182118
task_result.get(timeout=300) # 5 minute timeout per chunk
2119-
# Now delete the main object after all chunks are done
2120-
result = self.delete_chunk([obj])
2121-
# Wait for final deletion to complete
2122-
if hasattr(result, "get"):
2123-
result.get(timeout=300) # 5 minute timeout
2119+
# Now delete the main object after all chunks are done
2120+
result = self.delete_chunk([obj])
2121+
# Wait for final deletion to complete
2122+
if hasattr(result, "get"):
2123+
result.get(timeout=300) # 5 minute timeout
21242124
logger.debug("ASYNC_DELETE: Successfully deleted " + self.get_object_name(obj) + ": " + str(obj))
21252125

21262126
def chunk_list(self, model, full_list):

helm/defectdojo/Chart.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "2.54.0-dev"
33
description: A Helm chart for Kubernetes to install DefectDojo
44
name: defectdojo
5-
version: 1.9.3-dev
5+
version: 1.9.4-dev
66
icon: https://defectdojo.com/hubfs/DefectDojo_favicon.png
77
maintainers:
88
- name: madchap
@@ -34,6 +34,4 @@ dependencies:
3434
# description: Critical bug
3535
annotations:
3636
artifacthub.io/prerelease: "true"
37-
artifacthub.io/changes: |
38-
- kind: changed
39-
description: chore(deps)_ update gcr.io/cloudsql_docker/gce_proxy docker tag from 1.37.10 to v1.37.11 (helm/defectdojo/values.yaml)
37+
artifacthub.io/changes: ""

helm/defectdojo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ The HELM schema will be generated for you.
511511
512512
# General information about chart values
513513
514-
![Version: 1.9.3-dev](https://img.shields.io/badge/Version-1.9.3--dev-informational?style=flat-square) ![AppVersion: 2.54.0-dev](https://img.shields.io/badge/AppVersion-2.54.0--dev-informational?style=flat-square)
514+
![Version: 1.9.4-dev](https://img.shields.io/badge/Version-1.9.4--dev-informational?style=flat-square) ![AppVersion: 2.54.0-dev](https://img.shields.io/badge/AppVersion-2.54.0--dev-informational?style=flat-square)
515515
516516
A Helm chart for Kubernetes to install DefectDojo
517517

0 commit comments

Comments
 (0)