Skip to content

Commit

Permalink
pass fake state to Annotation ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
emillon committed Oct 31, 2014
1 parent 32f31cd commit b7e6155
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,12 @@ def generate(fake, doc, user):
posy = fake.random_int(0, 600)
width = fake.random_int(50, 300)
height = fake.random_int(50, 300)
if fake.boolean():
state = Annotation.STATE_OPEN
else:
state = Annotation.STATE_CLOSED
text = fake.text()
ann = Annotation(doc, page, posx, posy, width, height, text, user)
ann = Annotation(doc, page, posx, posy, width, height, text, user, state)
return ann

def is_closed(self):
Expand Down

0 comments on commit b7e6155

Please sign in to comment.