[PR #15511] [MERGED] Closes #15490: CustomValidator support for accessing related object attribute via dotted path #14608

Closed
opened 2025-12-29 23:25:28 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15511
Author: @jeremystretch
Created: 3/22/2024
Status: Merged
Merged: 3/25/2024
Merged by: @jeremystretch

Base: featureHead: 15490-custom-validator-attrs


📝 Commits (1)

  • d817ad2 Closes #15490: CustomValidator support for accessing related object attribute via dotted path

📊 Changes

2 files changed (+27 additions, -6 deletions)

View changed files

📝 netbox/extras/tests/test_customvalidators.py (+24 -3)
📝 netbox/extras/validators.py (+3 -3)

📄 Description

Fixes: #15490

  • Use operator.attrgetter to reference attributes of related objects by dotted path
  • Rename extras/tests/test_customvalidation.py to avoid confusion with test_custom_validation.py
  • Add a test for validating related object attributes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15511 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/22/2024 **Status:** ✅ Merged **Merged:** 3/25/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `15490-custom-validator-attrs` --- ### 📝 Commits (1) - [`d817ad2`](https://github.com/netbox-community/netbox/commit/d817ad2a7d1ccd8e323323f9144a9fe25a90b9ef) Closes #15490: CustomValidator support for accessing related object attribute via dotted path ### 📊 Changes **2 files changed** (+27 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/tests/test_customvalidators.py` (+24 -3) 📝 `netbox/extras/validators.py` (+3 -3) </details> ### 📄 Description ### Fixes: #15490 - Use `operator.attrgetter` to reference attributes of related objects by dotted path - Rename `extras/tests/test_customvalidation.py` to avoid confusion with `test_custom_validation.py` - Add a test for validating related object attributes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:25:28 +01:00
adam closed this issue 2025-12-29 23:25:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14608