Fix panic in DB Update (#136)

This commit is contained in:
Asim Aslam
2021-06-02 18:42:36 +01:00
committed by GitHub
parent 2621c0e2e2
commit 78edac080f

View File

@@ -74,7 +74,7 @@ func (e *Db) Update(ctx context.Context, req *db.UpdateRequest, rsp *db.UpdateRe
// where ID is specified do a single update record update
if id, ok := m["ID"].(string); ok {
// apply the update to a single record
return db.Table(req.Table).First(Record{ID: id}).Updates(m).Error
return db.Table(req.Table).First(&Record{ID: id}).Updates(m).Error
}
// apply all the updates