Skip to content

Commit

Permalink
refactor: fix qa errors
Browse files Browse the repository at this point in the history
hirotasoshu authored and wannacfuture committed May 13, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 459392f commit e66366b
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion axes/apps.py
Original file line number Diff line number Diff line change
@@ -33,7 +33,6 @@ def initialize(cls):

# Skip startup log messages if Axes is not set to verbose
if settings.AXES_VERBOSE:

if callable(settings.AXES_LOCKOUT_PARAMETERS) or isinstance(
settings.AXES_LOCKOUT_PARAMETERS, str
):
4 changes: 1 addition & 3 deletions axes/helpers.py
Original file line number Diff line number Diff line change
@@ -222,9 +222,7 @@ def get_lockout_parameters(
credentials: Optional[dict] = None,
) -> List[Union[str, List[str]]]:
if callable(settings.AXES_LOCKOUT_PARAMETERS):
return settings.AXES_LOCKOUT_PARAMETERS(
request_or_attempt, credentials
)
return settings.AXES_LOCKOUT_PARAMETERS(request_or_attempt, credentials)

if isinstance(settings.AXES_LOCKOUT_PARAMETERS, str):
return import_string(settings.AXES_LOCKOUT_PARAMETERS)(

0 comments on commit e66366b

Please sign in to comment.