Re-add random color for solid Diaper Changes in `fake` command.

This commit is contained in:
Christopher Charbonneau Wells 2017-11-18 06:55:39 -05:00
parent eff1320a5e
commit 4aa51e44da
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ class Command(BaseCommand):
solid = choice([True, False, False, False]) solid = choice([True, False, False, False])
wet = choice([True, False]) wet = choice([True, False])
color = '' color = ''
if solid:
color = choice(
models.DiaperChange._meta.get_field('color').choices)[0]
if not wet and not solid: if not wet and not solid:
wet = True wet = True
time = self.time + timedelta(minutes=randint(1, 60)) time = self.time + timedelta(minutes=randint(1, 60))