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: #17497 - Handle invalid accessor fields in bulk import forms #17594

Merged

Conversation

bctiemann
Copy link
Contributor

@bctiemann bctiemann commented Sep 24, 2024

Fixes: #17497

More generally solves the issue of invalid accessor field names in a BulkImportForm by adding FieldError handling to the to_python method of CSVModelChoiceField.

Note that this will only fix #17497 if #17593 is merged.

Screenshot 2024-09-24 at 5 30 44 PM

@bctiemann bctiemann changed the title Add handling for FieldError to CSVModelChoiceField.to_python to handl… Fixes: #17497 - Handle invalid accessor fields in bulk import forms Sep 24, 2024
@jeremystretch jeremystretch merged commit 52a0b45 into develop Sep 26, 2024
6 checks passed
@jeremystretch jeremystretch deleted the 17497-handle-invalid-accessor-field-bulk-import branch September 26, 2024 19:31
bctiemann added a commit that referenced this pull request Oct 11, 2024
…17594)

* Add handling for FieldError to CSVModelChoiceField.to_python to handle invalid accessor field

* manufacturer & default_platform should be CSVModelChoiceFields

* Fix string translation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
jeremystretch added a commit to alehaa/netbox that referenced this pull request Oct 11, 2024
…k import forms (netbox-community#17594)

* Add handling for FieldError to CSVModelChoiceField.to_python to handle invalid accessor field

* manufacturer & default_platform should be CSVModelChoiceFields

* Fix string translation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk Import: Unknown accessor for a related field leads to 500 error
2 participants