Skip to content

Commit

Permalink
Fix parameter passing error
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunagm committed Dec 22, 2021
1 parent a52f053 commit b86a64a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metagov/metagov/core/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, app: MetagovApp):

### Incoming Webhook Logic ###

def pass_to_plugin_instance(self, request, community_slug, community_platform_id):
def pass_to_plugin_instance(self, request, plugin_name, community_slug, community_platform_id):
"""Passes incoming request to a specific pluin instance as well as all pending GovernanceProcesses
associated with that plugin."""

Expand Down Expand Up @@ -68,7 +68,7 @@ def pass_to_plugin_instance(self, request, community_slug, community_platform_id

return response

def pass_to_platformwide_handlers(self, plugin_name, request):
def pass_to_platformwide_handlers(self, request, plugin_name):
"""Passes request to platform-wide handlers (e.g. Slack, where there is one webhook for all
communities)."""
plugin_handler = self._get_plugin_request_handler(plugin_name)
Expand All @@ -86,7 +86,7 @@ def handle_incoming_webhook(
logger.debug(f"Received webhook request: {plugin_name} ({community_platform_id or 'no community_platform_id'}) ({community_slug or 'no community'})")

if community_slug:
response = self.pass_to_plugin_instance(request, community_slug, community_platform_id)
response = self.pass_to_plugin_instance(request, plugin_name, community_slug, community_platform_id)
return response or HttpResponse()

response = self.pass_to_platformwide_handlers(request, plugin_name)
Expand Down

0 comments on commit b86a64a

Please sign in to comment.