updated pumping fake data for start/end/duration

This commit is contained in:
John Merlie 2023-06-16 17:12:18 -04:00 committed by Christopher Charbonneau Wells
parent e56ff48128
commit 7918b9aca8
1 changed files with 7 additions and 3 deletions

View File

@ -145,8 +145,12 @@ class Command(BaseCommand):
if choice([True, False, False, False]):
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(
child=self.child, amount=self.amount, time=self.time, notes=notes
child=self.child, amount=self.amount, start=start, end=end, notes=notes
).save()
@transaction.atomic