Skip to content

Commit

Permalink
fix pb parser (#4032)
Browse files Browse the repository at this point in the history
* fix pb parser

* rns
  • Loading branch information
dantavori committed Feb 18, 2024
1 parent 48d8c6c commit 72bb236
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changelog/4032.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue where a few USES relationships between playbooks were not collected by the playbook parser.
type: fix
pr_number: 4032
5 changes: 4 additions & 1 deletion demisto_sdk/commands/content_graph/parsers/base_playbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def handle_playbook_task(self, task: Dict[str, Any], is_mandatory: bool) -> None
task (Dict[str, Any]): The task details.
is_mandatory (bool): Whether or not the dependency is mandatory.
"""
if playbook := task.get("task", {}).get("playbookName"):
if playbook := (
task.get("task", {}).get("playbookName")
or task.get("task", {}).get("playbookId")
):
self.add_relationship(
RelationshipType.USES_PLAYBOOK,
target=playbook,
Expand Down

0 comments on commit 72bb236

Please sign in to comment.