Skip to content

Commit

Permalink
Always set updated_at on transfer and deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
polyaxon-ci committed Sep 26, 2023
1 parent 2df659d commit e4efa32
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion haupt/haupt/apis/methods/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def transfer_run(view, request, *args, **kwargs):
)

view.run.project_id = dest_project.id
view.run.save(update_fields=["project_id"])
view.run.save(update_fields=["project_id", "updated_at"])
if view.run.has_pipeline:
Models.Run.all.filter(Q(pipeline=view.run) | Q(controller=view.run)).update(
project_id=dest_project.id
Expand Down
2 changes: 1 addition & 1 deletion haupt/haupt/apis/project_resources/views/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def post(self, request, *args, **kwargs):
)

self.version.project_id = dest_project.id
self.version.save(update_fields=["project_id"])
self.version.save(update_fields=["project_id", "updated_at"])
add_version_contributors(self.version, users=[request.user])
self.audit(request, *args, **kwargs)
return Response(status=status.HTTP_200_OK, data={})
Expand Down
2 changes: 1 addition & 1 deletion haupt/haupt/db/signals/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def check_related_run_to_artifact(sender, instance=None, created=False, **kwargs
and run.versions.exclude(id=instance.id).count() == 0
):
run.meta_info.pop(META_IS_PROMOTED, None)
run.save(update_fields=["meta_info"])
run.save(update_fields=["meta_info", "update_at"])

0 comments on commit e4efa32

Please sign in to comment.