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) {
id, err := GenerateNodeID()
if err != nil {
return nil, err
}
datas, _, _ := wfa.Search(nil, id, false)
datas, _, _ := wfa.Search(&dbs.Filters{
And: map[string][]dbs.Filter{
"relation": {{Operator: dbs.EQUAL.String(), Value: 1}},
},
}, "", false)
if len(datas) > 0 {
return datas[0], nil
}