[PR #19570] [MERGED] Fixes #19490: restores nesting behavior of DataSource-based ConfigTemplate #15674

Closed
opened 2025-12-30 00:23:20 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19570
Author: @jnovinger
Created: 5/23/2025
Status: Merged
Merged: 5/28/2025
Merged by: @bctiemann

Base: mainHead: 19490-jinja-template-fails-with-empty-include


📝 Commits (1)

  • d7672ab Fixes #19490: restores nesting behavior of DataSource-based ConfigTemplates

📊 Changes

3 files changed (+90 additions, -8 deletions)

View changed files

📝 netbox/extras/models/mixins.py (+1 -1)
📝 netbox/extras/tests/test_models.py (+71 -5)
📝 netbox/utilities/jinja2.py (+18 -2)

📄 Description

Fixes: #19490

The ability to render nested templates was accidentally removed with the implementation of #17653, which normalized the behavior of various Jinja2 template rendering actions.

This fix restores that behavior while retaining the normalized behavior. This fix also includes regression tests to ensure this behavior is not removed accidentally again in the future.


🔄 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/19570 **Author:** [@jnovinger](https://github.com/jnovinger) **Created:** 5/23/2025 **Status:** ✅ Merged **Merged:** 5/28/2025 **Merged by:** [@bctiemann](https://github.com/bctiemann) **Base:** `main` ← **Head:** `19490-jinja-template-fails-with-empty-include` --- ### 📝 Commits (1) - [`d7672ab`](https://github.com/netbox-community/netbox/commit/d7672ab2605c5232f07410752a2c55ab46bd9965) Fixes #19490: restores nesting behavior of DataSource-based ConfigTemplates ### 📊 Changes **3 files changed** (+90 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/models/mixins.py` (+1 -1) 📝 `netbox/extras/tests/test_models.py` (+71 -5) 📝 `netbox/utilities/jinja2.py` (+18 -2) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #19490 The ability to render nested templates was accidentally removed with the implementation of #17653, which normalized the behavior of various Jinja2 template rendering actions. This fix restores that behavior while retaining the normalized behavior. This fix also includes regression tests to ensure this behavior is not removed accidentally again in the future. <!-- Please include a summary of the proposed changes below. --> --- <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-30 00:23:20 +01:00
adam closed this issue 2025-12-30 00:23:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15674