mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 16:58:37 +00:00
fix sqlite lock (#5184)
* fix sqlite lock * fix bug Co-Authored-By: lunny <xiaolunwen@gmail.com> * fix bug Co-Authored-By: lunny <xiaolunwen@gmail.com>
This commit is contained in:
@@ -448,7 +448,11 @@ func (repo *Repository) MustGetUnit(tp UnitType) *RepoUnit {
|
||||
|
||||
// GetUnit returns a RepoUnit object
|
||||
func (repo *Repository) GetUnit(tp UnitType) (*RepoUnit, error) {
|
||||
if err := repo.getUnits(x); err != nil {
|
||||
return repo.getUnit(x, tp)
|
||||
}
|
||||
|
||||
func (repo *Repository) getUnit(e Engine, tp UnitType) (*RepoUnit, error) {
|
||||
if err := repo.getUnits(e); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, unit := range repo.Units {
|
||||
|
Reference in New Issue
Block a user