You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/06/26 08:15:00 UTC

[jira] [Resolved] (AIRFLOW-4354) utils.py class UtcDateTimeFilterMixin

     [ https://issues.apache.org/jira/browse/AIRFLOW-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ash Berlin-Taylor resolved AIRFLOW-4354.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.10.4

> utils.py class UtcDateTimeFilterMixin 
> --------------------------------------
>
>                 Key: AIRFLOW-4354
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4354
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: ui
>    Affects Versions: 1.10.2
>            Reporter: JinPing
>            Priority: Minor
>             Fix For: 1.10.4
>
>         Attachments: airflow_bug.mov
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> ui search task instances filtered by date between,
>  'list' object has no attribute 'utcoffset'
> {code:java}
> // code placeholder
> {code}
> class UtcDateTimeFilterMixin(object): def clean(self, value): dt = super(UtcDateTimeFilterMixin, self).clean(value) if isinstance(dt, list): # fix date between bug: 'list' object has no attribute 'utcoffset' result = [] for item in dt: result.append(timezone.make_aware(item, timezone=timezone.utc)) return result else: return timezone.make_aware(dt, timezone=timezone.utc)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)