mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09: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:
1 parent
99c09dfbfa
commit
2b7c366f64
3 files changed
+17
-5
No files matched your search
+5
-1
@@ -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