Просмотр исходного кода

remove constraint from sqlstore

ryan 7 лет назад
Родитель
Сommit
a0a6fa6fa5
1 измененных файлов с 0 добавлено и 3 удалено
  1. 0 3
      pkg/services/sqlstore/annotation.go

+ 0 - 3
pkg/services/sqlstore/annotation.go

@@ -15,9 +15,6 @@ type SqlAnnotationRepo struct {
 }
 }
 
 
 func (r *SqlAnnotationRepo) Save(item *annotations.Item) error {
 func (r *SqlAnnotationRepo) Save(item *annotations.Item) error {
-	if item.DashboardId == 0 {
-		return errors.New("Annotation is missing dashboard_id")
-	}
 	return inTransaction(func(sess *DBSession) error {
 	return inTransaction(func(sess *DBSession) error {
 		tags := models.ParseTagPairs(item.Tags)
 		tags := models.ParseTagPairs(item.Tags)
 		item.Tags = models.JoinTagPairs(tags)
 		item.Tags = models.JoinTagPairs(tags)