fix: revert allowed empty fields for NTP servers

This commit is contained in:
Mateusz Filipowicz
2025-03-11 00:54:44 +01:00
parent 55cfe22636
commit a10b02ca2c
2 changed files with 5 additions and 9 deletions

View File

@@ -489,10 +489,6 @@ customizations:
fields: fields:
_all: _all:
omitEmpty: false omitEmpty: false
SettingNtp:
fields:
_all:
omitEmpty: false
SettingRsyslogd: SettingRsyslogd:
fields: fields:
Contents: Contents:

View File

@@ -29,11 +29,11 @@ type SettingNtp struct {
Key string `json:"key"` Key string `json:"key"`
NtpServer1 string `json:"ntp_server_1"` NtpServer1 string `json:"ntp_server_1,omitempty"`
NtpServer2 string `json:"ntp_server_2"` NtpServer2 string `json:"ntp_server_2,omitempty"`
NtpServer3 string `json:"ntp_server_3"` NtpServer3 string `json:"ntp_server_3,omitempty"`
NtpServer4 string `json:"ntp_server_4"` NtpServer4 string `json:"ntp_server_4,omitempty"`
SettingPreference string `json:"setting_preference" validate:"omitempty,oneof=auto manual"` // auto|manual SettingPreference string `json:"setting_preference,omitempty" validate:"omitempty,oneof=auto manual"` // auto|manual
} }
func (dst *SettingNtp) UnmarshalJSON(b []byte) error { func (dst *SettingNtp) UnmarshalJSON(b []byte) error {