Skip to content

Commit

Permalink
@W-14603959 - backend test failure fixes to save instance object befo…
Browse files Browse the repository at this point in the history
…re adding more data
  • Loading branch information
vsbharath committed Dec 5, 2023
1 parent 8e2b7df commit 9eb9ec9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/api/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,11 @@ components:
- Review
- Merged
type: string
description: |-
* `Planned` - Planned
* `In progress` - In Progress
* `Review` - Review
* `Merged` - Merged
FullUser:
type: object
properties:
Expand Down Expand Up @@ -2118,6 +2123,10 @@ components:
- QA
- Playground
type: string
description: |-
* `Dev` - Dev
* `QA` - QA
* `Playground` - Playground
PaginatedEpicList:
type: object
properties:
Expand Down Expand Up @@ -2481,11 +2490,17 @@ components:
- Approved
- Changes requested
type: string
description: |-
* `Approved` - Approved
* `Changes requested` - Changes Requested
RoleEnum:
enum:
- assigned_qa
- assigned_dev
type: string
description: |-
* `assigned_qa` - assigned_qa
* `assigned_dev` - assigned_dev
ScratchOrg:
type: object
properties:
Expand Down Expand Up @@ -2909,6 +2924,11 @@ components:
- Completed
- Canceled
type: string
description: |-
* `Planned` - Planned
* `In progress` - In Progress
* `Completed` - Completed
* `Canceled` - Canceled
securitySchemes:
cookieAuth:
type: apiKey
Expand Down
1 change: 1 addition & 0 deletions metecho/api/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ def _create_org_and_run_flow(
originating_user_id=originating_user_id,
sf_username=scratch_org.owner_sf_username,
)
scratch_org.save()
scratch_org.refresh_from_db()
# Save these values on org creation so that we have what we need to
# delete the org later, even if the initial flow run fails.
Expand Down
3 changes: 2 additions & 1 deletion metecho/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,9 @@ def __str__(self):
return self.name

def save(self, *args, **kwargs):
obj = super().save(*args, **kwargs)
self.update_status()
return super().save(*args, **kwargs)
return obj

def subscribable_by(self, user): # pragma: nocover
return True
Expand Down

0 comments on commit 9eb9ec9

Please sign in to comment.