Emmanuel Brard created AIRFLOW-3196:
---------------------------------------
Summary: Filtering from admin views on any dates fails
Key: AIRFLOW-3196
URL: https://issues.apache.org/jira/browse/AIRFLOW-3196
Project: Apache Airflow
Issue Type: Bug
Components: webapp
Affects Versions: 1.10.0
Environment: Airflow 1.10
Reporter: Emmanuel Brard
Any filtering on any date fields from all admin views fails with :
{code}
-------------------------------------------------------------------------------
Node: airflow-web-95fd56cd6-csvh7
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line
1116, in _execute_context
context = constructor(dialect, self, conn, *args)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py",
line 623, in _init_compiled
param.append(processors[key](compiled_params[key]))
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/type_api.py",
line 1078, in process
return process_param(value, dialect)
File "/usr/local/lib/python3.6/site-packages/airflow/utils/sqlalchemy.py",
line 156, in process_bind_param
raise ValueError('naive datetime is disallowed')
ValueError: naive datetime is disallowed
{code}
It looks like DateTimeField from wtforms TZ aware in
https://github.com/apache/incubator-airflow/blob/master/airflow/www/forms.py#L31
Probably using
https://github.com/apache/incubator-airflow/blob/master/airflow/utils/timezone.py#L98
will help.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)