diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index b9d45a10ee..dfb288642e 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -162,9 +162,7 @@ class ForeignKeyRawIdWidget(forms.TextInput): params = self.url_parameters() if params: - related_url += '?' + '&'.join( - '%s=%s' % (k, v) for k, v in params.items(), - ) + related_url += '?' + '&'.join('%s=%s' % (k, v) for k, v in params.items()) context['related_url'] = mark_safe(related_url) context['link_title'] = _('Lookup') # The JavaScript code looks for this class.