Skip to content

Commit

Permalink
fix: do not change namespace for deleted jobs (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mryashbhardwaj authored Oct 16, 2023
1 parent ca63b6b commit 05bd518
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/store/postgres/job/job_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,12 @@ func changeJobNamespace(ctx context.Context, tx pgx.Tx, jobName job.Name, tenant
changeJobNamespaceQuery := `
UPDATE job SET
namespace_name = $1,
updated_at = NOW(), deleted_at = null
updated_at = NOW()
WHERE
name = $2 AND
project_name = $3 AND
namespace_name = $4
namespace_name = $4 AND
deleted_at is null
;`
tag, err := tx.Exec(ctx, changeJobNamespaceQuery, newTenant.NamespaceName(), jobName,
tenant.ProjectName(), tenant.NamespaceName())
Expand Down

0 comments on commit 05bd518

Please sign in to comment.