Commit 818d48c2 by Marcus Efraimsson

always execute the user teams query

parent 5be2332c
...@@ -403,7 +403,8 @@ func GetSignedInUser(query *m.GetSignedInUserQuery) error { ...@@ -403,7 +403,8 @@ func GetSignedInUser(query *m.GetSignedInUserQuery) error {
if user.OrgRole == "" { if user.OrgRole == "" {
user.OrgId = -1 user.OrgId = -1
user.OrgName = "Org missing" user.OrgName = "Org missing"
} else { }
getTeamsByUserQuery := &m.GetTeamsByUserQuery{OrgId: user.OrgId, UserId: user.UserId} getTeamsByUserQuery := &m.GetTeamsByUserQuery{OrgId: user.OrgId, UserId: user.UserId}
err = GetTeamsByUser(getTeamsByUserQuery) err = GetTeamsByUser(getTeamsByUserQuery)
if err != nil { if err != nil {
...@@ -414,7 +415,6 @@ func GetSignedInUser(query *m.GetSignedInUserQuery) error { ...@@ -414,7 +415,6 @@ func GetSignedInUser(query *m.GetSignedInUserQuery) error {
for i, t := range getTeamsByUserQuery.Result { for i, t := range getTeamsByUserQuery.Result {
user.Teams[i] = t.Id user.Teams[i] = t.Id
} }
}
query.Result = &user query.Result = &user
return err return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment