Skip to content

Commit 72ac386

Browse files
authored
Merge pull request #11664 from DefectDojo/release/2.42.3
Release: Merge release into master from: release/2.42.3
2 parents 250b993 + 1645e04 commit 72ac386

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+73641
-51449
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Update Sample Data
2+
3+
env:
4+
GIT_USERNAME: "DefectDojo release bot"
5+
GIT_EMAIL: "dojo-release-bot@users.noreply.github.com"
6+
7+
on:
8+
workflow_dispatch: # Trigger manually
9+
schedule:
10+
# Run on the 1st day of January, April, July, and October at midnight UTC
11+
- cron: '0 0 1 1,4,7,10 *'
12+
13+
jobs:
14+
run-binary-and-create-pr:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# Checkout the repository
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
with:
21+
ref: ${{ github.ref_name || 'dev'}}
22+
23+
- name: Run binary
24+
run: |
25+
./fixture-updater dojo/fixtures/defect_dojo_sample_data.json
26+
mv output.json dojo/fixtures/defect_dojo_sample_data.json
27+
28+
- name: Configure git
29+
run: |
30+
git config --global user.name "${{ env.GIT_USERNAME }}"
31+
git config --global user.email "${{ env.GIT_EMAIL }}"
32+
33+
- name: Create and switch to a new branch
34+
run: |
35+
git checkout -b update-file-$(date +%Y%m%d%H%M%S)
36+
git add dojo/fixtures/defect_dojo_sample_data.json
37+
git commit -m "Update sample data"
38+
39+
- name: Push branch
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: |
43+
git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
44+
45+
- name: Create Pull Request
46+
uses: peter-evans/create-pull-request@v5
47+
with:
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
commit-message: "Update sample data"
50+
branch: ${{ github.ref_name || 'dev'}}
51+
base: dev
52+
title: "Update sample data"
53+
body: "This pull request updates the sample data."

components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "defectdojo",
3-
"version": "2.42.2",
3+
"version": "2.42.3",
44
"license" : "BSD-3-Clause",
55
"private": true,
66
"dependencies": {

dojo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# Django starts so that shared_task will use this app.
55
from .celery import app as celery_app # noqa: F401
66

7-
__version__ = "2.42.2"
7+
__version__ = "2.42.3"
88
__url__ = "https://github.com/DefectDojo/django-DefectDojo"
99
__docs__ = "https://documentation.defectdojo.com"

dojo/api_v2/prefetch/mixins.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
class PrefetchListMixin(ListModelMixin):
88
def list(self, request, *args, **kwargs):
9-
prefetch_params = request.GET.get("prefetch", "").split(",")
9+
prefetch_params = request.GET.get("prefetch", "")
10+
prefetch_params = prefetch_params.split(",") if "," in prefetch_params else request.GET.getlist("prefetch")
11+
1012
prefetcher = _Prefetcher()
1113

1214
# Apply the same operations as the standard list method defined in the
@@ -30,7 +32,9 @@ def list(self, request, *args, **kwargs):
3032

3133
class PrefetchRetrieveMixin(RetrieveModelMixin):
3234
def retrieve(self, request, *args, **kwargs):
33-
prefetch_params = request.GET.get("prefetch", "").split(",")
35+
prefetch_params = request.GET.get("prefetch", "")
36+
prefetch_params = prefetch_params.split(",") if "," in prefetch_params else request.GET.getlist("prefetch")
37+
3438
prefetcher = _Prefetcher()
3539

3640
entry = self.get_object()

dojo/components/sql_group_concat.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ def __init__(
1818
**extra,
1919
)
2020

21-
def as_mysql(self, compiler, connection):
22-
return super().as_sql(
23-
compiler,
24-
connection,
25-
template="%(function)s(%(distinct)s%(expressions)s%(ordering)s%(separator)s)",
26-
separator=f" SEPARATOR '{self.separator}'",
27-
)
28-
2921
def as_sql(self, compiler, connection, **extra):
3022
return super().as_sql(
3123
compiler,

0 commit comments

Comments
 (0)