Skip to content

Commit

Permalink
Removed unnecessary setdefault() from CheckRegistry.register().
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm authored and timgraham committed Feb 26, 2018
1 parent 8116e58 commit 61596f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions django/core/checks/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ def my_check(apps, **kwargs):
# or
registry.register(my_check, 'mytag', 'anothertag')
"""
kwargs.setdefault('deploy', False)

def inner(check):
check.tags = tags
checks = self.deployment_checks if kwargs['deploy'] else self.registered_checks
checks = self.deployment_checks if kwargs.get('deploy') else self.registered_checks
checks.add(check)
return check

Expand Down

0 comments on commit 61596f4

Please sign in to comment.