Skip to content

Commit

Permalink
Fixed Preflight api to return valid results
Browse files Browse the repository at this point in the history
  • Loading branch information
jain-naman-sf committed Oct 13, 2023
1 parent f1c9e13 commit aafa613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadeploy/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def run(self, ctx, plan, steps, org):

class PreflightResultQuerySet(models.QuerySet):
def most_recent(self, *, org_id, plan, is_valid_and_complete=True):
kwargs = {"org_id": org_id, "plan": plan}
kwargs = {"org_id": org_id, "plan": plan, "is_valid": True}
if is_valid_and_complete:
kwargs.update({"is_valid": True, "status": PreflightResult.Status.complete})
return self.filter(**kwargs).order_by("-created_at").first()
Expand Down

0 comments on commit aafa613

Please sign in to comment.