mirror of
https://github.com/go-gitea/gitea
synced 2025-07-24 19:28:38 +00:00
Remove check for negative length (#5120)
This commit is contained in:
committed by
techknowlogick
parent
583b1b8429
commit
5a4648cdd6
@@ -134,7 +134,7 @@ func NewLabels(labels ...*Label) error {
|
||||
// If pass repoID as 0, then ORM will ignore limitation of repository
|
||||
// and can return arbitrary label with any valid ID.
|
||||
func getLabelInRepoByName(e Engine, repoID int64, labelName string) (*Label, error) {
|
||||
if len(labelName) <= 0 {
|
||||
if len(labelName) == 0 {
|
||||
return nil, ErrLabelNotExist{0, repoID}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user