data._get_timeseries_dict: fix if logic error