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

Fixes GenericForeignKey validation #11550

Merged
merged 3 commits into from
Apr 10, 2023
Merged

Fixes GenericForeignKey validation #11550

merged 3 commits into from
Apr 10, 2023

Conversation

abhi1693
Copy link
Member

@abhi1693 abhi1693 commented Jan 20, 2023

Fixes: #10221, #11454

Added a validation on NetBoxModel clean() method for GenericForeignKey fields to ensure that the content type and object ID exist.

@abhi1693
Copy link
Member Author

abhi1693 commented Mar 4, 2023

@DanSheps Could you please review this as you had assigned me the issues? If there are changes needed, I'd be happy to make them

Copy link
Member

@DanSheps DanSheps left a comment

Choose a reason for hiding this comment

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

Looks good to me, however I would like @jeremystretch to review it.

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Thanks @abhi1693, and sorry for the delay in getting to this.

netbox/netbox/models/__init__.py Outdated Show resolved Hide resolved
netbox/netbox/models/__init__.py Outdated Show resolved Hide resolved
@abhi1693 abhi1693 requested a review from jeremystretch April 10, 2023 15:44
@jeremystretch jeremystretch merged commit b41f875 into netbox-community:develop Apr 10, 2023
@abhi1693 abhi1693 deleted the fix/10221-fix-gfk-validation branch April 10, 2023 18:05
@jeremystretch jeremystretch mentioned this pull request May 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IP address model does not check if assigned_object exists
3 participants