Skip to content

Commit

Permalink
pep8 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
habfast committed Feb 25, 2014
1 parent 58d217f commit 2805804
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bitfield/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ def render(self, name, value, attrs=None, choices=()):
if isinstance(value, BitHandler):
value = [k for k, v in value if v]
elif isinstance(value, int):
real_value=[]
div=2
for (k,v) in self.choices:
real_value = []
div = 2
for (k, v) in self.choices:
if value % div != 0:
real_value.append(k)
value -= (value % div)
div*=2
value=real_value
div *= 2
value = real_value
return super(BitFieldCheckboxSelectMultiple, self).render(
name, value, attrs=attrs, choices=enumerate(choices))

Expand Down

0 comments on commit 2805804

Please sign in to comment.