misc: fix dangerous-default-value pylint error (#56288)

This commit is contained in:
Lauréline Guérin 2021-08-30 11:39:36 +02:00
parent e3631bc285
commit 3bf3327684
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
2 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,7 @@ from combo.middleware import get_request
# _make_key and _HashedSeq imported/adapted from functools from Python 3.2+
# pylint: disable=dangerous-default-value
def _make_key(
args,
kwds,

View File

@ -55,7 +55,8 @@ def sign_string(s, key, algo='sha256', timedelta=30):
return hash.digest()
def check_request_signature(django_request, keys=[]):
def check_request_signature(django_request, keys=None):
keys = keys or []
query_string = django_request.META['QUERY_STRING']
if not query_string:
return False