fix(build): org list API and unused import #412

Merged
jmiller merged 1 commits from dev into main 2026-06-02 13:22:16 +00:00
+4 -4
View File
@@ -50,11 +50,11 @@ func Settings(ctx *context.Context) {
ctx.Data["ContextUser"] = ctx.ContextUser
ctx.Data["ParentOrgID"] = ctx.Org.Organization.ParentOrgID
// Load available parent orgs (all orgs the current user owns, excluding self).
// Load available parent orgs (all orgs the current user belongs to, excluding self).
if ctx.Doer.IsAdmin || ctx.Org.IsOwner {
orgs, _ := org_model.FindOrgs(ctx, org_model.FindOrgOptions{
UserID: ctx.Doer.ID,
IncludePrivate: true,
orgs, _ := db.Find[org_model.Organization](ctx, org_model.FindOrgOptions{
UserID: ctx.Doer.ID,
IncludeVisibility: structs.VisibleTypePrivate,
})
var parentCandidates []*org_model.Organization
for _, o := range orgs {