Skip to content

Commit

Permalink
Merge pull request #246 from pkajaba/fix_missing_class_attribute
Browse files Browse the repository at this point in the history
Use the constant DEFAULT_FILTER_KEY imported from json2sql.select directly.
  • Loading branch information
tisnik authored Jan 29, 2018
2 parents 39b7d89 + 0d8d0a1 commit 028e37e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion f8a_jobs/api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ def post_schedule_job(scheduler, handler_name, **kwargs):
def post_show_select_query(filter_definition):
"""Show SQL query that will be used in case of filter parametrized jobs."""
try:
from json2sql.select import DEFAULT_FILTER_KEY
query = BaseHandler(job_id=None).construct_select_query(filter_definition.pop(
BaseHandler.DEFAULT_FILTER_KEY))
DEFAULT_FILTER_KEY))
except Exception as exc:
logger.exception(str(exc))
return {"error": str(exc), "traceback": traceback.format_exc()}, 400
Expand Down

0 comments on commit 028e37e

Please sign in to comment.