Skip to content

Commit 250b266

Browse files
committed
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.
1 parent a2b0da3 commit 250b266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/perm/access/access.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func refreshAccesses(ctx context.Context, repo *repo_model.Repository, accessMap
9797
}
9898

9999
// Query existing accesses for cross-comparison
100-
existingAccesses, err := db.Find[Access](ctx, &Access{RepoID: repo.ID})
100+
existingAccesses, err := db.Find[Access](ctx, builder.Eq{"repo_id": repo.ID})
101101
if err != nil {
102102
return fmt.Errorf("find existing accesses: %w", err)
103103
}

0 commit comments

Comments
 (0)