mirror of https://github.com/snachodog/mybuddy.git
Add Diaper Change amounts to fake data generation
This commit is contained in:
parent
4194d833d2
commit
7f258f972d
|
@ -106,6 +106,7 @@ class Command(BaseCommand):
|
||||||
models.DiaperChange._meta.get_field('color').choices)[0]
|
models.DiaperChange._meta.get_field('color').choices)[0]
|
||||||
if not wet and not solid:
|
if not wet and not solid:
|
||||||
wet = True
|
wet = True
|
||||||
|
amount = Decimal('%d.%d' % (randint(0, 6), randint(1, 9)))
|
||||||
time = self.time + timedelta(minutes=randint(1, 60))
|
time = self.time + timedelta(minutes=randint(1, 60))
|
||||||
|
|
||||||
if time < self.time_now:
|
if time < self.time_now:
|
||||||
|
@ -114,7 +115,8 @@ class Command(BaseCommand):
|
||||||
time=time,
|
time=time,
|
||||||
wet=wet,
|
wet=wet,
|
||||||
solid=solid,
|
solid=solid,
|
||||||
color=color
|
color=color,
|
||||||
|
amount=amount
|
||||||
).save()
|
).save()
|
||||||
self.time = time
|
self.time = time
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue