From dd63cc896766b1f537cb5f399d3ad22cffe217af Mon Sep 17 00:00:00 2001 From: Daniel Ryan Date: Mon, 15 Sep 2014 11:19:29 -0400 Subject: [PATCH] changing syntax of widget.attrs checking to conform to flake test --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 779f050e4..2c4b263ce 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -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'