Skip to content

Commit

Permalink
Merge pull request #7 from ALERTua/main
Browse files Browse the repository at this point in the history
adds node.data.docstring precaution
  • Loading branch information
anze3db authored Oct 16, 2024
2 parents 82a260d + 0cee8c2 commit 7ffbc1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/django_tui/management/commands/tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7ffbc1b

Please sign in to comment.