Skip to content

Commit

Permalink
Merge pull request #206 from kayceeDev/fix-model
Browse files Browse the repository at this point in the history
Fix: update model status
  • Loading branch information
Yashsharma1911 authored Jan 13, 2025
2 parents bd81bfa + 323f35a commit 0fb8445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/v1beta1/model/model_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (m *ModelDefinition) Create(db *database.Handler, hostID uuid.UUID) (uuid.U
}

func (m *ModelDefinition) UpdateStatus(db *database.Handler, status entity.EntityStatus) error {
err := db.Model(&Model{}).Where("id = ?", m.Id).Update("status", status).Error
err := db.Model(&ModelDefinition{}).Where("id = ?", m.Id).Update("status", status).Error
if err != nil {
return entity.ErrUpdateEntityStatus(err, string(m.Type()), status)
}
Expand Down

0 comments on commit 0fb8445

Please sign in to comment.