Skip to content

Commit

Permalink
Move set num repos to lower function.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsvantesson committed Nov 8, 2019
1 parent 7aad519 commit 9f297cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions models/org_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,6 @@ func (t *Team) RemoveAllRepositories() (err error) {
return err
}

t.NumRepos = 0
if _, err = sess.ID(t.ID).Cols("num_repos").Update(t); err != nil {
return err
}

return sess.Commit()
}

Expand Down Expand Up @@ -339,6 +334,11 @@ func (t *Team) removeAllRepositories(e Engine) (err error) {
return err
}

t.NumRepos = 0
if _, err = e.ID(t.ID).Cols("num_repos").Update(t); err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit 9f297cc

Please sign in to comment.