Skip to content

Commit

Permalink
[breakdown] always set shared assets from other projects as ready
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBldy committed Nov 5, 2024
1 parent 1646d2e commit 3a1749b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zou/app/services/breakdown_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,9 @@ def _get_task_type_priority_map(project_id):

def _is_asset_ready(asset, task, priority_map):
is_ready = False
if "ready_for" in asset and asset["ready_for"] is not None:
if asset["is_shared"] and asset["project_id"] != str(task.project_id):
is_ready = True
elif "ready_for" in asset and asset["ready_for"] is not None:
priority_ready = priority_map.get(asset["ready_for"], -1) or -1
priority_task = priority_map.get(str(task.task_type_id), 0) or 0
is_ready = priority_task <= priority_ready
Expand Down

0 comments on commit 3a1749b

Please sign in to comment.