diff --git a/bloom_lims/api/v1/worksets.py b/bloom_lims/api/v1/worksets.py index 4534ee3..d20495b 100644 --- a/bloom_lims/api/v1/worksets.py +++ b/bloom_lims/api/v1/worksets.py @@ -98,14 +98,18 @@ async def get_workset(euid: str, user: APIUser = Depends(require_api_auth)): bdb = get_bdb(user.email) bob = get_bob(bdb) - workset = bob.get_by_euid(euid) + try: + workset = bob.get_by_euid(euid) + except Exception: + workset = None + if not workset: raise HTTPException(status_code=404, detail=f"Workset not found: {euid}") if workset.category != "subject" or workset.type != "workset": raise HTTPException(status_code=404, detail=f"Not a workset: {euid}") - props = workset.json_addl.get("properties", {}) + props = workset.json_addl.get("properties", {}) if workset.json_addl else {} members = subjecting.list_members_for_subject(bob, euid) return { @@ -181,7 +185,11 @@ async def add_workset_members( bob = get_bob(bdb) # Verify workset exists - workset = bob.get_by_euid(euid) + try: + workset = bob.get_by_euid(euid) + except Exception: + workset = None + if not workset: raise HTTPException(status_code=404, detail=f"Workset not found: {euid}") @@ -217,7 +225,11 @@ async def get_workset_members(euid: str, user: APIUser = Depends(require_api_aut bob = get_bob(bdb) # Verify workset exists - workset = bob.get_by_euid(euid) + try: + workset = bob.get_by_euid(euid) + except Exception: + workset = None + if not workset: raise HTTPException(status_code=404, detail=f"Workset not found: {euid}") @@ -254,7 +266,11 @@ async def complete_workset( bob = get_bob(bdb) # Verify workset exists - workset = bob.get_by_euid(euid) + try: + workset = bob.get_by_euid(euid) + except Exception: + workset = None + if not workset: raise HTTPException(status_code=404, detail=f"Workset not found: {euid}") diff --git a/templates/legacy/workflow_details.html b/templates/legacy/workflow_details.html index 71b5824..5f99279 100644 --- a/templates/legacy/workflow_details.html +++ b/templates/legacy/workflow_details.html @@ -155,9 +155,10 @@ + {# Query both container_instance AND content_instance lineages per Rule 6 #} {% if step.parent_of_lineages %}
- {% for child_step in step.get_sorted_parent_of_lineages(['container_instance']) %} + {% for child_step in step.get_sorted_parent_of_lineages(['container_instance', 'content_instance']) %} {% if child_step.child_instance.category != 'workflow_step' and udat.get('wf_filter','off') == 'off' %}