-
Notifications
You must be signed in to change notification settings - Fork 62
yadcf_range_number search inf not working - mysql? #121
Copy link
Copy link
Open
Description
When I do a yadcf_range_number search with the filter only specifying one side, an error is generated. I am not sure if this is an issue with mysql or with python 2.7 use of float('inf'). The response to the browser has
json.error
"(_mysql_exceptions.OperationalError) (1054, "Unknown column 'inf' in 'where clause'")
[SQL: SELECT count(*) AS count_1
FROM (SELECT race.date AS race_date
FROM series, raceresult INNER JOIN runner ON runner.id = raceresult.runnerid INNER JOIN race ON race.id = raceresult.raceid INNER JOIN location ON location.id = race.locationid
WHERE raceresult.club_id = %s AND race.date BETWEEN %s AND %s AND lower(raceresult.runnerid) LIKE lower(%s) AND series.name LIKE %s AND round(race.distance, %s) BETWEEN %s AND %s) AS anon_1]
[parameters: (2L, datetime.datetime(2016, 7, 1, 0, 0), datetime.datetime(2019, 7, 9, 0, 0), '%502%', 'grandprix', 2, 5.0, inf)]
(Background on this error at: http://sqlalche.me/e/e3q8)"
so seems float('inf') at
| v_to = float(v_to) if v_to != '' else float('inf') |
inf as the second parameter for the between clause of the query.
I see this is tested at
| def test_yadcf_range_number_gt(session): |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels