If you search by is blank for any of the integer fields, CofkUnionWork.date_of_work_std_year, CofkUnionWork.date_of_work_std_month or CofkUnionWork.date_of_work_std_day,
you get a SQL Type error:
DataError at /work/search
invalid input syntax for type integer: ""
LINE 1: ...td_year" IS NULL OR W0."date_of_work_std_year" = ('')) AND W...
If you search by is blank for any of the integer fields,
CofkUnionWork.date_of_work_std_year
,CofkUnionWork.date_of_work_std_month
orCofkUnionWork.date_of_work_std_day
,you get a SQL Type error:
https://github.com/culturesofknowledge/site-edit-2/blob/6838d39c5e71c04189955282e25be344aa57a343/sharedlib/djangolib/query_utils.py#L78
I'm not sure how best to resolve this as there is no information on the model field types at this stage.