From 61596f40ad42f5c96aafd10b8585b8ba5643c0cf Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 26 Feb 2018 14:54:55 +0100 Subject: [PATCH] Removed unnecessary setdefault() from CheckRegistry.register(). --- django/core/checks/registry.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/django/core/checks/registry.py b/django/core/checks/registry.py index 9d44940016..9660272d9b 100644 --- a/django/core/checks/registry.py +++ b/django/core/checks/registry.py @@ -40,11 +40,9 @@ class CheckRegistry: # 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