mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	Fix CountOrphanedLabels in orphan check (#20009)
gitea doctor --run check-db-consistency is currently broken due to an incorrect and old use of Count() with a string. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		| @@ -733,7 +733,7 @@ func DeleteLabelsByRepoID(ctx context.Context, repoID int64) error { | ||||
|  | ||||
| // CountOrphanedLabels return count of labels witch are broken and not accessible via ui anymore | ||||
| func CountOrphanedLabels() (int64, error) { | ||||
| 	noref, err := db.GetEngine(db.DefaultContext).Table("label").Where("repo_id=? AND org_id=?", 0, 0).Count("label.id") | ||||
| 	noref, err := db.GetEngine(db.DefaultContext).Table("label").Where("repo_id=? AND org_id=?", 0, 0).Count() | ||||
| 	if err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user