mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 09:52:26 +02:00
Fix order by parameter (#19849)
Upgrade builder to v0.3.11 Upgrade xorm to v1.3.1 and fixed some hidden bugs. Replace #19821 Replace #19834 Included #19850 Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
449ea6005f
commit
12c742f8dc
19 changed files with 175 additions and 72 deletions
|
@ -25,9 +25,8 @@ func addCollaborator(ctx context.Context, repo *repo_model.Repository, u *user_m
|
|||
RepoID: repo.ID,
|
||||
UserID: u.ID,
|
||||
}
|
||||
e := db.GetEngine(ctx)
|
||||
|
||||
has, err := e.Get(collaboration)
|
||||
has, err := db.GetByBean(ctx, collaboration)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if has {
|
||||
|
@ -35,7 +34,7 @@ func addCollaborator(ctx context.Context, repo *repo_model.Repository, u *user_m
|
|||
}
|
||||
collaboration.Mode = perm.AccessModeWrite
|
||||
|
||||
if _, err = e.InsertOne(collaboration); err != nil {
|
||||
if err = db.Insert(ctx, collaboration); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue