deserialize test
This commit is contained in:
parent
e89b5aae84
commit
070f2d063e
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user