From 72bb23624bc6e55c2d9750b9abf32ceda7a996cd Mon Sep 17 00:00:00 2001 From: Dan Tavori <38749041+dantavori@users.noreply.github.com> Date: Sun, 18 Feb 2024 13:26:56 +0200 Subject: [PATCH] fix pb parser (#4032) * fix pb parser * rns --- .changelog/4032.yml | 4 ++++ demisto_sdk/commands/content_graph/parsers/base_playbook.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changelog/4032.yml diff --git a/.changelog/4032.yml b/.changelog/4032.yml new file mode 100644 index 0000000000..f5c1590a36 --- /dev/null +++ b/.changelog/4032.yml @@ -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 diff --git a/demisto_sdk/commands/content_graph/parsers/base_playbook.py b/demisto_sdk/commands/content_graph/parsers/base_playbook.py index d66db244fb..6d66b25b9f 100644 --- a/demisto_sdk/commands/content_graph/parsers/base_playbook.py +++ b/demisto_sdk/commands/content_graph/parsers/base_playbook.py @@ -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,