light modification

This commit is contained in:
mr 2025-01-23 09:27:27 +01:00
parent f8ac3154e1
commit 8cba10c4fe
2 changed files with 4 additions and 2 deletions

View File

@ -68,7 +68,8 @@ func (a *collaborativeAreaMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
data.(*CollaborativeArea).Clear(id) // set the creator data.(*CollaborativeArea).Clear(id) // set the creator
// retrieve or proper peer // retrieve or proper peer
dd, code, err := a.peerAccessor.Search(nil, "0", true) dd, code, err := a.peerAccessor.Search(nil, "0", true)
if code != 200 || len(dd) == 0 {
if code != 200 || dd == nil || len(dd) == 0 {
return nil, code, errors.New("Could not retrieve the peer" + err.Error()) return nil, code, errors.New("Could not retrieve the peer" + err.Error())
} }
data.(*CollaborativeArea).CollaborativeAreaRule.Creator = dd[0].GetID() data.(*CollaborativeArea).CollaborativeAreaRule.Creator = dd[0].GetID()

View File

@ -28,7 +28,8 @@ type WorkflowExecutions struct {
} }
func (r *WorkflowExecutions) StoreDraftDefault() { func (r *WorkflowExecutions) StoreDraftDefault() {
r.IsDraft = true // r.IsDraft = true
r.IsDraft = false // TODO: TEMPORARY
} }
func (r *WorkflowExecutions) CanUpdate(set utils.DBObject) (bool, utils.DBObject) { func (r *WorkflowExecutions) CanUpdate(set utils.DBObject) (bool, utils.DBObject) {