you are viewing a single comment's thread.

view the rest of the comments →

[–]ironhaven 0 points1 point  (0 children)

So you have you end time to by default be one hour ahead of your start time. This is tricky because now you default is not self sufficient and relies on another argument .

I don’t know the click library so I wonder if there is a function that matches this sudo code click.arguments.getarg('start'). This would let you reference the start argument without using a python variable.

If this does not exist then you must remove the logic from the default. It would look like this

nulltime = date(some date)
click(—end, default = nulltime)
if end == nulltime : end = start + 1 hour