From 653b6d7a66366bbe802a30fbff359a1952b9ff84 Mon Sep 17 00:00:00 2001 From: Samuel Date: Fri, 6 May 2022 16:30:31 -0300 Subject: [PATCH] Remove wrong verification of asset properties --- assets/put.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/assets/put.go b/assets/put.go index c07e827..2f7a83a 100644 --- a/assets/put.go +++ b/assets/put.go @@ -111,22 +111,7 @@ func putRecursive(stub *sw.StubWrapper, object map[string]interface{}, root bool return nil, errors.NewCCError("existing sub-asset could not be fetched", 404) } - // if some property of the asset is different, we must update it - // otherwise we can return the existing asset. (we can't use DeepEqual because properties not sent should not be updated) - isDifferent := false - for k, v := range object { - if strings.HasPrefix(k, "@") { - continue - } - - if v != asset[k] { - isDifferent = true - } - } - - if !isDifferent { - return asset, nil - } + // TODO: check property by property if asset must be updated } }