regular_costs #5

Merged
jlusiardi merged 19 commits from regular_costs into master 2021-06-18 20:20:13 +02:00
1 changed files with 1 additions and 2 deletions
Showing only changes of commit 3a2b25d3bd - Show all commits

View File

@ -67,8 +67,7 @@ def create_pit_stop_form(vid, cid):
form.set_pitstops(vehicle.pitstops) form.set_pitstops(vehicle.pitstops)
form.same_odometer_allowed = (type(data[-1]) != Pitstop) or (data[-1].consumable.id != cid) form.same_odometer_allowed = (type(data[-1]) != Pitstop) or (data[-1].consumable.id != cid)
else: else:
form.set_pitstop(Pitstop(date(1970, 1, 1), 0, vid, 0, '')) form.set_pitstops([Pitstop(date(1970, 1, 1), 0, vid, 0, ''),Pitstop(0, 0, date(1970, 1, 1), 0, cid)])
form.set_pitstop(Pitstop(0, 0, date(1970, 1, 1), 0, cid))
form.same_odometer_allowed = True form.same_odometer_allowed = True
# set the label of the litres field to make the user comfortable # set the label of the litres field to make the user comfortable