Skip to content

Is it possible to set date_to equal to None ? #27

Description

@zaninip

I have a command line like that:

response = api.measurements(location=location, limit=5000, date_from=dt_start, date_to=dt_end, df=True, index='utc')

where according to previous code, dt_end could be a date (to stop measurements to a certain date) or None if you want all the measurements until now. The problem is that when dt_end = None, the api command does not take into account the date_from parameter neither.
I could avoid the problem with
dt_end = datetime.date.today() if dt_end is None
but I think that the command should work also when one of the dates is None.
Is it a bug or there is a reason that I'm not seeing?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions