Skip to content

Commit

Permalink
Merge pull request #79 from Maker-Management-Platform/72-bug-report-r…
Browse files Browse the repository at this point in the history
…emoving-tag-from-project-does-not-delete-tag

Fix tags not updating Bug Report: Removing tag from Project does not …
  • Loading branch information
EduardoOliveira authored Jan 23, 2024
2 parents ff4f94f + f54c258 commit 1032ba6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/data/database/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ func InsertProject(p *models.Project) error {
}

func UpdateProject(p *models.Project) error {
return DB.Save(p).Error
if err := DB.Save(p).Error; err != nil {
return err
}
return DB.Model(p).Association("Tags").Replace(p.Tags)
}

func GetProjects() (rtn []*models.Project, err error) {
Expand Down

0 comments on commit 1032ba6

Please sign in to comment.