Skip to content

Commit

Permalink
fix: helpful links before create name to title
Browse files Browse the repository at this point in the history
  • Loading branch information
calisio committed Dec 16, 2024
1 parent 32f7b5f commit 34658ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/models/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 34658ed

Please sign in to comment.