1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00
This commit is contained in:
Unknown
2014-05-24 15:34:02 -04:00
parent 80055bde86
commit 87854c95a9
2 changed files with 13 additions and 1 deletions

View File

@@ -473,6 +473,10 @@ func NewLabel(l *Label) error {
// GetLabelById returns a label by given ID.
func GetLabelById(id int64) (*Label, error) {
if id <= 0 {
return nil, ErrLabelNotExist
}
l := &Label{Id: id}
has, err := orm.Get(l)
if err != nil {