mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08: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