From d3901f6576ddbd308775f3f915a2a744f324866a Mon Sep 17 00:00:00 2001 From: Stephen Kiely Date: Tue, 21 Feb 2023 15:06:42 -0600 Subject: [PATCH] Re-run black with updated version --- nautobot_chatops/workers/__init__.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nautobot_chatops/workers/__init__.py b/nautobot_chatops/workers/__init__.py index b000e4f7..4abd40e4 100644 --- a/nautobot_chatops/workers/__init__.py +++ b/nautobot_chatops/workers/__init__.py @@ -270,14 +270,9 @@ def second_subcommand(dispatcher, arg_1): if subcommand == "help" or not subcommand: message = f"I know the following `{dispatcher.command_prefix}{command}` subcommands:\n" for subcmd, entry in registry[command].get("subcommands", {}).items(): - if ( - settings.PLUGINS_CONFIG["nautobot_chatops"].get("restrict_help") - and not AccessGrant.objects.filter( - Q(command="*") | Q(command=command, subcommand="*") | Q(command=command, subcommand=subcmd), - ) - .filter(grant_type=AccessGrantTypeChoices.TYPE_USER) - .filter(Q(value="*") | Q(value=context["user_id"])) - ): + if settings.PLUGINS_CONFIG["nautobot_chatops"].get("restrict_help") and not AccessGrant.objects.filter( + Q(command="*") | Q(command=command, subcommand="*") | Q(command=command, subcommand=subcmd), + ).filter(grant_type=AccessGrantTypeChoices.TYPE_USER).filter(Q(value="*") | Q(value=context["user_id"])): continue message += ( f"- `{dispatcher.command_prefix}{command} {subcmd} "