fix build and lint errors

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2026-04-02 20:00:54 -04:00
parent 52f6c9bc45
commit 271b6c7cae
20 changed files with 89 additions and 18 deletions
+3
View File
@@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package group
import (
+3
View File
@@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package group
import (
+3
View File
@@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package group
import (
+3
View File
@@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package group
import (
+3
View File
@@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package group
import (
+6 -3
View File
@@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package group
import (
@@ -32,7 +35,7 @@ func GetGroupUnit(ctx context.Context, groupID, teamID int64, unitType unit.Type
And("team_id = ?", teamID).
And("type = ?", unitType).
Get(unit)
return
return unit, err
}
func GetMaxGroupUnit(ctx context.Context, groupID int64, unitType unit.Type) (unit *RepoGroupUnit, err error) {
@@ -42,12 +45,12 @@ func GetMaxGroupUnit(ctx context.Context, groupID int64, unitType unit.Type) (un
And("type = ?", unitType).
Find(&units)
if err != nil {
return
return nil, err
}
for _, u := range units {
if unit == nil || u.AccessMode > unit.AccessMode {
unit = u
}
}
return
return unit, err
}
+3
View File
@@ -1,3 +1,6 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package organization
import (
+4 -1
View File
@@ -1,12 +1,15 @@
// Copyright 2025 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package group
import (
repo_model "code.gitea.io/gitea/models/repo"
"context"
"code.gitea.io/gitea/models/db"
group_model "code.gitea.io/gitea/models/group"
organization_model "code.gitea.io/gitea/models/organization"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
"xorm.io/builder"