From df721f45f8a624550e663e0d99fc41071f40a887 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 27 Jan 2021 21:41:13 -0800 Subject: [PATCH] Reset the whole build block to avoid merge issues with 0 values --- server/update.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/update.go b/server/update.go index cc45946..c952979 100644 --- a/server/update.go +++ b/server/update.go @@ -55,11 +55,7 @@ func (s *Server) UpdateDataStructure(data []byte) error { // so it won't override the value we've passed through in the API call. However, we can // safely assume that we're passing through valid data structures here. I foresee this // backfiring at some point, but until then... - // - // We'll go ahead and do this with swap as well. - c.Build.CpuLimit = src.Build.CpuLimit - c.Build.Swap = src.Build.Swap - c.Build.DiskSpace = src.Build.DiskSpace + c.Build = src.Build // Mergo can't quite handle this boolean value correctly, so for now we'll just // handle this edge case manually since none of the other data passed through in this