mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-02 16:35:19 +02: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:
parent
99c09dfbfa
commit
2b7c366f64
3 changed files with 17 additions and 5 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue