mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fixed #200
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user