Skip to content

Commit 74129a3

Browse files
committed
fix sql
1 parent 82dc31f commit 74129a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/migrations/v1_21/v265.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ func FixMissingAdminTeamUnitRecords(x *xorm.Engine) error {
6969

7070
// find all admin teams
7171
teams := make([]*Team, 0)
72-
err := sess.Where("team.authorize == ?", AccessModeAdmin).Find(&teams)
72+
err := sess.Where("team.authorize = ?", AccessModeAdmin).Find(&teams)
7373
if err != nil {
7474
return err
7575
}
7676

7777
for _, team := range teams {
7878
// find all existing records
7979
teamunits := make([]*TeamUnit, 0, len(AllRepoUnitTypes))
80-
err := sess.Where("`team_unit`.team_id == ?", team.ID).Find(&teamunits)
80+
err := sess.Where("`team_unit`.team_id = ?", team.ID).Find(&teamunits)
8181
if err != nil {
8282
return err
8383
}

0 commit comments

Comments
 (0)