Added configurable empty_compliance_behavior setting to `GoldenConf…#1105
Open
itdependsnetworks wants to merge 2 commits intonautobot:developfrom
Open
Added configurable empty_compliance_behavior setting to `GoldenConf…#1105itdependsnetworks wants to merge 2 commits intonautobot:developfrom
empty_compliance_behavior setting to `GoldenConf…#1105itdependsnetworks wants to merge 2 commits intonautobot:developfrom
Conversation
…igSetting` to control how compliance is evaluated when configurations are empty.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
jeffkala
requested changes
Apr 30, 2026
| device = models.ForeignKey(to="dcim.Device", on_delete=models.CASCADE, help_text="The device") | ||
| rule = models.ForeignKey(to="ComplianceRule", on_delete=models.CASCADE, related_name="rule") | ||
| compliance = models.BooleanField(blank=True) | ||
| compliance = models.BooleanField(blank=True, null=True) |
Contributor
There was a problem hiding this comment.
Do we need a default= here too?
Contributor
Author
There was a problem hiding this comment.
to me, no. We want the caller to be explicit.
Contributor
There was a problem hiding this comment.
okay, thought there was considerations on default= when changing null=True, for existing rows in the DB.
Contributor
Author
There was a problem hiding this comment.
the boolean must have been set, so there is nothing to migrate, we are are only adding a nullable value.
Co-authored-by: Jeff Kala <48843785+jeffkala@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…igSetting` to control how compliance is evaluated when configurations are empty.
Fixes: #421 and potentially solution for #518