Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Sep 4, 2024
1 parent d2e7426 commit de1a1a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/depiction_targeted_preproc/pipeline/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def _set_workunit_processing(client: Bfabric, workunit_id: int) -> None:
# TODO the default resource should be deleted in the future, but right now we simply set it to 0 and available
# (it will not be possible before updated wrapper creator)
resources = Resource.find_by({"name": "% - resource", "workunitid": workunit_id}, client=client, max_results=1)
if len(resources):
client.save("resource", {"id": resources[0].id, "status": "available"})
if resources:
client.save("resource", {"id": list(resources.values())[0].id, "status": "available"})


def _set_workunit_available(client: Bfabric, workunit_id: int) -> None:
Expand Down

0 comments on commit de1a1a9

Please sign in to comment.