fix: template defaults fail with empty strings #16

Open
opened 2026-07-12 18:20:41 -07:00 by jdelpilar · 0 comments
Owner

Summary

Fix templates to correctly handle empty strings in variables.

Context

Current jinja templates don't correctly handle empty strings. This been entirely mitigated by having all variables defined as valid strings or not defined at all. However this is a fragile setup and will eventually lead to issues down the road.
Correcting current templates now will protect any future changes to variables from causing errors.

Proposed Changes

  • Identify all templates using the standard | default() filter.
  • Update occurrences to include the boolean evaluation flag: | default('value', true).

Verification Plan

  • verification will be done by hand to verify any and all templates are free from this issue
### Summary Fix templates to correctly handle empty strings in variables. ### Context Current jinja templates don't correctly handle empty strings. This been entirely mitigated by having all variables defined as valid strings or not defined at all. However this is a fragile setup and will eventually lead to issues down the road. Correcting current templates now will protect any future changes to variables from causing errors. ### Proposed Changes - [ ] Identify all templates using the standard `| default()` filter. - [ ] Update occurrences to include the boolean evaluation flag: `| default('value', true)`. ### Verification Plan - [ ] verification will be done by hand to verify any and all templates are free from this issue
jdelpilar added the bug label 2026-07-12 18:20:41 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jdelpilar/johto-infra#16