Skip to content

Commit

Permalink
fix(run): fix run logging update function (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
joremysh authored Oct 16, 2024
1 parent d800c3b commit a753fe4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,12 +813,9 @@ func (r *repository) CreateModelRun(ctx context.Context, modelRun *datamodel.Mod
func (r *repository) UpdateModelRun(ctx context.Context, modelRun *datamodel.ModelRun) error {

r.PinUser(ctx, tableModelRun)
db := r.CheckPinnedUser(ctx, r.db, tableModelRun)

if err := db.Save(modelRun).Error; err != nil {
return err
}
return nil
return r.CheckPinnedUser(ctx, r.db, tableModelRun).Model(&datamodel.ModelRun{}).
Where(&datamodel.ModelRun{BaseStaticHardDelete: datamodel.BaseStaticHardDelete{UID: modelRun.UID}}).
Updates(&modelRun).Error
}

func (r *repository) ListModelRunsByRequester(ctx context.Context, pageSize, page int64, filter filtering.Filter, order ordering.OrderBy,
Expand Down

0 comments on commit a753fe4

Please sign in to comment.