mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-06 23:10:57 +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:
parent
a2b0da306c
commit
250b266bb2
@ -97,7 +97,7 @@ func refreshAccesses(ctx context.Context, repo *repo_model.Repository, accessMap
|
||||
}
|
||||
|
||||
// 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 {
|
||||
return fmt.Errorf("find existing accesses: %w", err)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user