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 UI and model bugs #274

Merged
merged 5 commits into from
Oct 7, 2024
Merged

fix UI and model bugs #274

merged 5 commits into from
Oct 7, 2024

Conversation

gsnider2195
Copy link
Contributor

@gsnider2195 gsnider2195 commented Oct 3, 2024

Closes #222 Closes #233 Closes #245 Closes #275

to="dcim.Device",
through="NATPolicyDeviceM2M",
related_name="nat_policies",
blank=True,
Copy link
Member

Choose a reason for hiding this comment

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

What's the behavior change when the assigned items are all blank?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you're using automatically created form fields then the default behavior is to raise a ValidationError if the form field for this is blank. Since this project is explicitly defining the form fields for these model fields with required=False, this change is effectively a no-op. Based on how the forms were created, adding blank=True is the correct and desired behavior for this model field.

@gsnider2195 gsnider2195 merged commit 8a29380 into develop Oct 7, 2024
13 checks passed
@gsnider2195 gsnider2195 deleted the u/gas-233-policy-rule-name branch October 7, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants