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:
_all:
omitEmpty: false
SettingNtp:
fields:
_all:
omitEmpty: false
SettingRsyslogd:
fields:
Contents:

View File

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