0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-06 18:50:12 +01:00

Fix db.Find syntax in refreshAccesses optimization

Corrected the db.Find call to use builder.Eq for the condition
instead of passing a bean, which was causing compilation or runtime errors.
This commit is contained in:
Ross Golder 2025-10-19 13:39:26 +07:00
parent a2b0da306c
commit 250b266bb2
No known key found for this signature in database
GPG Key ID: 253A7E508D2D59CD

View File

@ -97,7 +97,7 @@ func refreshAccesses(ctx context.Context, repo *repo_model.Repository, accessMap
} }
// Query existing accesses for cross-comparison // Query existing accesses for cross-comparison
existingAccesses, err := db.Find[Access](ctx, &Access{RepoID: repo.ID}) existingAccesses, err := db.Find[Access](ctx, builder.Eq{"repo_id": repo.ID})
if err != nil { if err != nil {
return fmt.Errorf("find existing accesses: %w", err) return fmt.Errorf("find existing accesses: %w", err)
} }