mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Fix sqlite lock (#5176)
* fix sqlite lock * fix sqlite lock on getUnitType
This commit is contained in:
@ -215,7 +215,11 @@ func (t *Team) RemoveRepository(repoID int64) error {
|
||||
|
||||
// UnitEnabled returns if the team has the given unit type enabled
|
||||
func (t *Team) UnitEnabled(tp UnitType) bool {
|
||||
if err := t.getUnits(x); err != nil {
|
||||
return t.unitEnabled(x, tp)
|
||||
}
|
||||
|
||||
func (t *Team) unitEnabled(e Engine, tp UnitType) bool {
|
||||
if err := t.getUnits(e); err != nil {
|
||||
log.Warn("Error loading repository (ID: %d) units: %s", t.ID, err.Error())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user