Templates: fix azimuth 0 not allowed (#26997)
This commit is contained in:
parent
ac72064897
commit
bfdf803c6a
2 changed files with 4 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue