deserialize test

This commit is contained in:
mr 2024-07-19 15:20:03 +02:00
parent e89b5aae84
commit 070f2d063e
2 changed files with 2 additions and 3 deletions

View File

@ -61,7 +61,6 @@ func (dma *AbstractAccessor) SetLogger(t DataType) {
func (wfa *AbstractAccessor) GenericStoreOne(data DBObject, accessor Accessor) (DBObject, int, error) {
data.GenerateID()
err := validate.Struct(data)
wfa.Logger.Error().Msg("Could not store " + data.GetName() + " to db. Error: " + err.Error())
if err != nil {
return nil, 422, err
}

View File

@ -29,8 +29,8 @@ func (dma *Workflow) Deserialize(j map[string]interface{}) utils.DBObject {
return nil
}
json.Unmarshal(b, dma)
dma.AbstractObject.ObjDeserialize(j)
dma.AbstractWorkflow.ObjDeserialize(j)
//dma.AbstractObject.ObjDeserialize(j)
//dma.AbstractWorkflow.ObjDeserialize(j)
fmt.Println(j, dma)
return dma
}