From b7ae60fc6becaede2b1501e66651ff36639524c4 Mon Sep 17 00:00:00 2001 From: Leo Schick Date: Tue, 7 Feb 2023 16:59:38 +0100 Subject: [PATCH] do not modify the click command name when it is a MultiCommand #42 --- mara_app/app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mara_app/app.py b/mara_app/app.py index 0a50999..b6c46b9 100644 --- a/mara_app/app.py +++ b/mara_app/app.py @@ -66,8 +66,11 @@ def register_commands(self): if 'callback' in command.__dict__ and command.__dict__['callback']: package = command.__dict__['callback'].__module__.rpartition('.')[0] if package != 'flask': - command.name = package + '.' + command.name - self.cli.add_command(command) + if isinstance(command, click.MultiCommand): + self.cli.add_command(command) + else: + command.name = package + '.' + command.name + self.cli.add_command(command) def register_page_layout(self): """Adds a global layout with navigation etc. to pages"""