mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
changing syntax of widget.attrs checking to conform to flake test
This commit is contained in:
parent
fe4875108d
commit
dd63cc8967
|
@ -162,7 +162,7 @@ class Field(object):
|
|||
attrs = {}
|
||||
if 'id' not in self.widget.attrs:
|
||||
attrs['id'] = self._name
|
||||
if not 'class' in self.widget.attrs:
|
||||
if 'class' not in self.widget.attrs:
|
||||
attrs['class'] = 'form-control'
|
||||
elif attrs['class'].find('form-control') == -1:
|
||||
attrs['class'] += ' form-control'
|
||||
|
|
Loading…
Reference in New Issue
Block a user