Skip to content
Snippets Groups Projects
Commit 0b83fc95 authored by Janet Goldstein's avatar Janet Goldstein
Browse files

WS-858: lay groundwork for fixing `create_follow_on_capability_request`.

CapabilityRequest.current_execution removed to match CapabilityRequest ORM.
Tests pass.
parent 3ca3f81c
No related branches found
No related tags found
3 merge requests!718WS-858: fix bugs in `create_follow_on_capability_request`, hopefully for the last time,!716WS-858: unit test for `create_follow_on_capability_request`.,!714WS-858: lay groundwork for fixing `create_follow_on_capability_request`.
Pipeline #4007 passed
......@@ -21,7 +21,7 @@
class="btn btn-warning"
(click)="
capabilityLauncherService
.createImageRequestFromPreviousCal('std_cms_imaging', capabilityRequest.id)
.createImageRequestFromPreviousCal('std_cms_imaging', capabilityRequest.id, selectedVersion.version_number)
.subscribe(followonRequestObserver)
"
>
......
......@@ -27,7 +27,6 @@ export interface CapabilityRequest {
capability: Capability;
state: string;
versions: Array<CapabilityVersion>;
current_execution: CapabilityExecution;
ingested: boolean;
created_at: string;
updated_at: string;
......
......@@ -49,8 +49,9 @@ export class CapabilityLauncherService {
createImageRequestFromPreviousCal(
followonType: string,
requestId: string,
versionNumber: number,
): Observable<CapabilityRequest> {
const url = this.endpoint + "request/" + requestId + "/followon/" + followonType;
const url = this.endpoint + "request/" + requestId + + "/version/" + versionNumber + "/followon/" + followonType;
return this.httpClient.post<CapabilityRequest>(url, null);
}
......
......@@ -93,9 +93,12 @@ def capability_request_routes(config: Configurator):
pattern="capability/{capability_name}/request/calibration-from-ingestion-details",
request_method="POST",
)
version_url = request_url + "/version/{version}"
followon_pattern = f"{version_url}" + "/followon/{followon_type}"
config.add_route(
name="create_follow_on_capability_request",
pattern=f"{request_url}" + "/followon/{followon_type}",
pattern=followon_pattern,
request_method="POST",
)
config.add_route(
......
......@@ -27,7 +27,6 @@ from pyramid.testing import DummyRequest
# pylint: disable=C0415, E0401
# @pytest.mark.skip("Broken by addition of current_execution to version json")
def test_view_latest_version(request_null_capability: DummyRequest):
from capability.views.capability_version import view_latest_version
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment