From 0cee8c2a639a98e749893fbf198b514e5a5cd30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexey=20ALERT=20Rubash=D1=91ff?= Date: Wed, 16 Oct 2024 18:16:27 +0300 Subject: [PATCH] adds node.data.docstring preacution --- src/django_tui/management/commands/tui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/django_tui/management/commands/tui.py b/src/django_tui/management/commands/tui.py index 54f5146..06a7cfb 100644 --- a/src/django_tui/management/commands/tui.py +++ b/src/django_tui/management/commands/tui.py @@ -277,7 +277,7 @@ def _update_command_description(self, node: TreeNode[CommandSchema]) -> None: """Update the description of the command at the bottom of the sidebar based on the currently selected node in the command tree.""" description_box = self.query_one("#home-command-description", Static) - description_text = node.data.docstring or "" + description_text = getattr(node.data, "docstring", "") or "" description_text = description_text.lstrip() description_text = f"[b]{node.label if self.is_grouped_cli else self.click_app_name}[/]\n{description_text}" description_box.update(description_text)