Skip to content
Snippets Groups Projects
Commit 6144bbbd authored by Sam Kagan's avatar Sam Kagan
Browse files

Fixed bug caused by inconsistency in CR schema

parent 7d0f4229
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,6 @@ class TestCapabilityService:
fake_v1.capability_name = fake_capability.name
fake_v1.capability_request_id = fake_capability_request.id
fake_v1.request = fake_capability_request
fake_v1.capability_request = fake_capability_request
fake_v1.parameters = {"user_email": "nobody@nowhere.edu"}
fake_v1.executions = [fake_exec]
......
......@@ -1487,7 +1487,7 @@ class CapabilityVersion(JSONSerializable):
Schema representation of a capability version
"""
capability_request: CapabilityRequest
request: CapabilityRequest
version_number: int
parameters: List[ParameterIF]
workflow_metadata: dict[str, Any] # JSON-formatted
......
......@@ -306,7 +306,7 @@ class CapabilityService(CapabilityServiceIF):
logger.debug(f"Received {message['type']} (no action taken): {message}")
@on_message(service="workflow", type="workflow-updated")
def update_fetch_stage(self, **message: Dict):
def update_stage(self, **message: Dict):
# In here, we want to track whether or not the fetch start time is complete
# There are going to be various messages from the workflow. Most of the time we won't care about them.
msg_subject = message["subject"]
......@@ -345,13 +345,13 @@ class CapabilityService(CapabilityServiceIF):
# save it
self.capability_info.save_version(version)
if version.capability_request.controller.message_handler == "archive":
if version.request.controller.message_handler == "archive":
stage_info = {
"stage": stage,
"start": metadata.get(f"{stage}_start_time"),
"stop": metadata.get(f"{stage}_end_time"),
}
cr = version.capability_request
cr = version.request
# Send message to AAT
msg = ArchiveMessageArchitect(cr, stage_info=stage_info).compose_message("update")
self.archive_messenger.send_message(**msg)
......
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