changeset 3002:46ab2cb39471

Fixed serialization of confuguration durations.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 10 Apr 2019 17:46:50 +0200
parents 23f4fb9a205a
children 92818da6133d
files pkg/models/importbase.go
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/models/importbase.go	Wed Apr 10 17:36:41 2019 +0200
+++ b/pkg/models/importbase.go	Wed Apr 10 17:46:50 2019 +0200
@@ -91,8 +91,7 @@
 }
 
 func (cd *ConfigDuration) MarshalJSON() ([]byte, error) {
-	s := cd.Duration.String()
-	return json.Marshal([]byte(s))
+	return json.Marshal(cd.Duration.String())
 }
 
 func (ct *ConfigTime) UnmarshalJSON(data []byte) error {