getmyself

This commit is contained in:
mr
2026-03-02 16:24:14 +01:00
parent 44812309db
commit 542b0b73ab

View File

@@ -182,11 +182,11 @@ func GenericRawUpdateOne(set DBObject, id string, a Accessor) (DBObject, int, er
} }
func GetMySelf(wfa Accessor) (ShallowDBObject, error) { func GetMySelf(wfa Accessor) (ShallowDBObject, error) {
id, err := GenerateNodeID() datas, _, _ := wfa.Search(&dbs.Filters{
if err != nil { And: map[string][]dbs.Filter{
return nil, err "relation": {{Operator: dbs.EQUAL.String(), Value: 1}},
} },
datas, _, _ := wfa.Search(nil, id, false) }, "", false)
if len(datas) > 0 { if len(datas) > 0 {
return datas[0], nil return datas[0], nil
} }