mirror of https://github.com/snachodog/mybuddy.git
updated pumping fake data for start/end/duration
This commit is contained in:
parent
e56ff48128
commit
7918b9aca8
|
@ -145,8 +145,12 @@ class Command(BaseCommand):
|
||||||
if choice([True, False, False, False]):
|
if choice([True, False, False, False]):
|
||||||
notes = " ".join(self.faker.sentences(randint(1, 5)))
|
notes = " ".join(self.faker.sentences(randint(1, 5)))
|
||||||
|
|
||||||
|
start = self.time + timedelta(minutes=randint(1, 60))
|
||||||
|
end = start + timedelta(minutes=randint(5, 20))
|
||||||
|
|
||||||
|
if end < self.time_now:
|
||||||
models.Pumping.objects.create(
|
models.Pumping.objects.create(
|
||||||
child=self.child, amount=self.amount, time=self.time, notes=notes
|
child=self.child, amount=self.amount, start=start, end=end, notes=notes
|
||||||
).save()
|
).save()
|
||||||
|
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
|
|
Loading…
Reference in New Issue