Skip to content

Commit

Permalink
do not modify the click command name when it is a MultiCommand #42
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-schick committed Feb 7, 2023
1 parent b917eef commit b7ae60f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mara_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit b7ae60f

Please sign in to comment.