Skip to content

Commit

Permalink
return job_id as separate field when submitting device delet job
Browse files Browse the repository at this point in the history
  • Loading branch information
indy-independence committed Aug 21, 2023
1 parent bd269d1 commit 533fd8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cnaas_nms/api/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ def delete(self, device_id):
scheduled_by=get_jwt_identity(),
kwargs={"device_id": device_id},
)
return empty_result(data="Scheduled job {} to factory default device".format(job_id))
res = empty_result(data="Scheduled job {} to factory default device".format(job_id))
res["job_id"] = job_id
return res

Check warning on line 253 in src/cnaas_nms/api/device.py

View check run for this annotation

Codecov / codecov/patch

src/cnaas_nms/api/device.py#L251-L253

Added lines #L251 - L253 were not covered by tests
elif not isinstance(json_data["factory_default"], bool):
return empty_result(status="error", data="Argument factory_default must be boolean"), 400
with sqla_session() as session:
Expand Down

0 comments on commit 533fd8b

Please sign in to comment.