From 34658ed682171649f016457d7c6d4eed6bcd7479 Mon Sep 17 00:00:00 2001 From: calisio Date: Mon, 16 Dec 2024 11:51:38 -0500 Subject: [PATCH] fix: helpful links before create name to title --- backend/src/models/dashboard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/models/dashboard.go b/backend/src/models/dashboard.go index 7896a283..a7ee4030 100644 --- a/backend/src/models/dashboard.go +++ b/backend/src/models/dashboard.go @@ -20,7 +20,7 @@ func (HelpfulLink) TableName() string { func (hl *HelpfulLink) BeforeCreate(tx *gorm.DB) error { var id int if hl.OpenContentProviderID == 0 { - if err := tx.Table("open_content_providers").Select("id").Where("name = ? ", HelpfulLinks).Scan(&id).Error; err != nil { + if err := tx.Table("open_content_providers").Select("id").Where("title = ? ", HelpfulLinks).Scan(&id).Error; err != nil { return err } hl.OpenContentProviderID = uint(id)