Skip to content

Commit

Permalink
Fixing an issue within the dispatch method of the view where the rout…
Browse files Browse the repository at this point in the history
…e key was missing from the arg. Now continues
  • Loading branch information
StevenMapes committed Dec 12, 2022
1 parent da950fa commit 95e0709
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.9 - 12th December 2022
- Fixing an issue within the dispatch method of the view where the route key was missing from the arg. Now continues
with the checks.

# 1.0.8 - 9th December 2022
- Corrected the examples of the CSRF and Session values on the README file.

Expand Down
4 changes: 2 additions & 2 deletions django_aws_api_gateway_websockets/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def dispatch(self, request, *args, **kwargs):
"""
if self._expected_headers(request) and self._allowed_apigateway(request):
if request.method.lower() in self.http_method_names:
if "connect" == self.kwargs["route"]:
if "connect" == self.kwargs.get("route"):
handler = self.connect
elif "disconnect" == self.kwargs["route"]:
elif "disconnect" == self.kwargs.get("route"):
if not self._expected_useragent(request, *args, **kwargs):
handler = self.invalid_useragent
else:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ skip = [

[project]
name = "django-aws-api-gateway-websockets"
version = "1.0.8"
version = "1.0.9"
authors = [
{ name="Steven Mapes", email="steve@stevenmapes.com" },
]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = django-aws-api-gateway-websockets
version = 1.0.8
version = 1.0.9
description = Created to allow Django projects to be used as a HTTP backend for AWS API Gateway websockets
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# When I removed everything to [testenv:py38-django32] the builds pass but coverage does not run

[tox]
isolated_build = True
requires = coverage
Expand Down

0 comments on commit 95e0709

Please sign in to comment.