You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/14 16:36:16 UTC
[GitHub] mistercrunch commented on a change in pull request #5621: Fix
annotation_json endpoint
mistercrunch commented on a change in pull request #5621: Fix annotation_json endpoint
URL: https://github.com/apache/incubator-superset/pull/5621#discussion_r210020856
##########
File path: superset/connectors/sqla/models.py
##########
@@ -47,8 +47,6 @@ def query(self, query_obj):
error_message = None
qry = db.session.query(Annotation)
qry = qry.filter(Annotation.layer_id == query_obj['filter'][0]['val'])
- qry = qry.filter(Annotation.start_dttm >= query_obj['from_dttm'])
- qry = qry.filter(Annotation.end_dttm <= query_obj['to_dttm'])
Review comment:
how about:
```
if query_obj['from_dttm']:
qry = qry.filter(Annotation.start_dttm >= query_obj['from_dttm'])
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org