diff options
| author | Daniel Hahler <github@thequod.de> | 2018-03-03 19:35:09 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-03-03 13:35:09 -0500 |
| commit | 683341db4396d92e4578d348b7fcce3312df505d (patch) | |
| tree | 184cbdd24993f1d23db4283478c6ca2b6f20a4ca /django/contrib/admin/widgets.py | |
| parent | 3d8fadad0f7a3a32f28db034650182117ae071f7 (diff) | |
Condensed some widgets code.
Diffstat (limited to 'django/contrib/admin/widgets.py')
| -rw-r--r-- | django/contrib/admin/widgets.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 91795d4ce4..ab57f53433 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -389,10 +389,7 @@ class AutocompleteMixin: self.admin_site = admin_site self.db = using self.choices = choices - if attrs is not None: - self.attrs = attrs.copy() - else: - self.attrs = {} + self.attrs = {} if attrs is None else attrs.copy() def get_url(self): model = self.rel.model |
