Skip to content

Commit

Permalink
[bugfix] if do_dispatch_github_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBRoswell committed Aug 12, 2024
1 parent 175eb05 commit 3b0f718
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vreapis/containerizer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ def create(self, request: Request, *args, **kwargs):
do_dispatch_github_workflow = True
else:
image_info = self.query_registry_for_image(image_repo=image_repo, image_name=current_cell.task_name, )
common.logger.debug(f'image_info: {image_info}')
if not image_info:
do_dispatch_github_workflow = True

Expand All @@ -538,9 +539,7 @@ def create(self, request: Request, *args, **kwargs):
return return_error(resp.text)
current_cell.set_image_version(image_version)
Cell.objects.filter(task_name=current_cell.task_name).delete()
serializer = self.get_serializer(data=current_cell)
serializer.is_valid(raise_exception=True)
instance = serializer.save()
current_cell.save()

return Response({'wf_id': wf_id, 'dispatched_github_workflow': do_dispatch_github_workflow, 'image_version': image_version})

Expand Down

0 comments on commit 3b0f718

Please sign in to comment.