Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken migration 0197 #9606

Merged
merged 3 commits into from
Feb 22, 2024
Merged

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented Feb 21, 2024

Fix #9600

If the user manually disabled TestType, it is not safe to run get_or_create with a static variable. It should be moved to defaults

@github-actions github-actions bot added the New Migration Adding a new migration file. Take care when merging. label Feb 21, 2024
Copy link

dryrunsecurity bot commented Feb 21, 2024

Contextual Security Analysis

As DryRun Security performs checks, we’ll summarize them here. You can always dive into the detailed results in the section below for checks.

Status DryRun Security Check
Sensitive Functions Analyzer
Configured Sensitive Files Analyzer
Sensitive Files Analyzer

Chat with your AI-powered Security Buddy by typing @dryrunsecurity followed by your question into a comment.
Example: @dryrunsecurity What are common security issues with web application cookies?

Install and configure more repositories at DryRun Security

Copy link
Contributor

@manuel-sommer manuel-sommer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also fix then:

mend_test_type, _ = test_type_model.objects.get_or_create(name="Mend Scan", active=True)

@manuel-sommer
Copy link
Contributor

@kiblik: Please also rename your PR from Fix broken migration 0179 to Fix broken migration 0197

@kiblik kiblik changed the title Fix broken migration 0179 Fix broken migration 0197 Feb 21, 2024
@manuel-sommer
Copy link
Contributor

Nice, looks good. I guess you can put it in to review?

@kiblik kiblik marked this pull request as ready for review February 21, 2024 19:46
Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Copy link
Contributor

@Maffooch Maffooch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had no idea about this defaults parameter! Very cool. Thank you for fixing :)

@Maffooch Maffooch merged commit bcb234d into DefectDojo:bugfix Feb 22, 2024
121 of 122 checks passed
@kiblik kiblik deleted the fix_db_mig_0179 branch February 22, 2024 20:07
@kiblik kiblik mentioned this pull request Feb 22, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Migration Adding a new migration file. Take care when merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants