Reset the whole build block to avoid merge issues with 0 values

This commit is contained in:
Dane Everitt 2021-01-27 21:41:13 -08:00
parent aca9ffc122
commit df721f45f8
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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 // 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 // safely assume that we're passing through valid data structures here. I foresee this
// backfiring at some point, but until then... // backfiring at some point, but until then...
// c.Build = src.Build
// 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
// Mergo can't quite handle this boolean value correctly, so for now we'll just // 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 // handle this edge case manually since none of the other data passed through in this