Skip to content

fix handling of foreign custom fields#759

Open
Phill93 wants to merge 3 commits intonautobot:developfrom
Phill93:fix-foreign-custom-field
Open

fix handling of foreign custom fields#759
Phill93 wants to merge 3 commits intonautobot:developfrom
Phill93:fix-foreign-custom-field

Conversation

@Phill93
Copy link
Copy Markdown

@Phill93 Phill93 commented Apr 3, 2025

Closes: #723

What's Changed

Handle foreign custom fields. The attribute _custom_field_data contains a dictionary so getattr fails with an AttributeError exception. My fix checks if related_object is a dictionary and handles that different.

To Do

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • Documentation Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

@Phill93 Phill93 requested a review from a team as a code owner April 3, 2025 08:23
@Kircheneer
Copy link
Copy Markdown
Contributor

Hey @Phill93 and thanks for the PR!

Please

  • add a change log fragment (see first failing CI)
  • add a unit test that asserts this behaviour keeps working in the future

@jdrew82
Copy link
Copy Markdown
Contributor

jdrew82 commented Jun 17, 2025

@Phill93 just wanted to see if you could address the requested changes from @Kircheneer?

@Phill93
Copy link
Copy Markdown
Author

Phill93 commented Jun 18, 2025

@jdrew82 Yes, I have that on the plan. I just don't have time for it right now.

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.

Nautobot Adapter fails to load into DiffSync model CustomFieldAnnotation if only "key" is set

3 participants