Templates: fix azimuth 0 not allowed (#26997)

This commit is contained in:
andig 2026-01-25 18:55:58 +01:00 • committed by GitHub
parent ac72064897
commit bfdf803c6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -16,7 +16,8 @@ params:
help:
en: -180 = north, -90 = east, 0 = south, 90 = west, 180 = north
de: -180 = Norden, -90 = Osten, 0 = Süden, 90 = Westen, 180 = Norden
example: 180
type: int
example: 0
required: true
- name: horizon
description:

View file

@ -273,9 +273,9 @@ func (p *Param) IsDeprecated() bool {
func (p *Param) IsZero(s string) bool {
switch p.Type {
case TypeInt:
return cast.ToInt64(s) == 0
return cast.ToInt64(s) == 0 && p.Name != "az"
case TypeFloat:
return cast.ToFloat64(s) == 0
return cast.ToFloat64(s) == 0 && p.Name != "az"
case TypeDuration:
return cast.ToDuration(s) == 0
default: