From 542b0b73aba52830503e134e98cdd21ed8e8c256 Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 2 Mar 2026 16:24:14 +0100 Subject: [PATCH] getmyself --- models/utils/common.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/utils/common.go b/models/utils/common.go index 4def085..797599e 100755 --- a/models/utils/common.go +++ b/models/utils/common.go @@ -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 }