fix some of the flaky tests

This commit is contained in:
Gani Georgiev committed 2026-08-22 11:33:18 +03:00
1 parent f544fa0c81
commit b648b951b0
8 files changed
+101 -100

No files matched your search

-13
View File
@@ -257,13 +257,6 @@ func (s *Settings) DBExport(app App) (map[string]any, error) {
}
result["updated"] = now
// @todo remove with encoding/json/2
// serialize as empty array
//nolint:staticcheck
if s.settings.SuperuserIPs == nil {
s.settings.SuperuserIPs = []string{}
}
encoded, err := json.Marshal(s.settings, json.Deterministic(true))
if err != nil {
return nil, err
@@ -355,12 +348,6 @@ func (s *Settings) MarshalJSON() ([]byte, error) {
}
}
// @todo remove with encoding/json/2
// serialize as empty array
if copy.SuperuserIPs == nil {
copy.SuperuserIPs = []string{}
}
return json.Marshal(copy, json.Deterministic(true))
}