Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unicode escape for superset datasets #1562

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions questionnaires/superset/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
}

CALCULATED_COLUMN_EXPRESSION_MAP = {
'checkbox': "((form_data::json)->'{}')::text",
'checkboxes': "trim(both '\"' from json_array_elements((form_data::json)->'{}')::TEXT)",
'dropdown': "trim(both '\"' from ((form_data::json)->'{}')::text)",
'email': "trim(both '\"' from ((form_data::json)->'{}')::text)",
'singleline': "((form_data::json)->'{}')::text",
'multiline': "((form_data::json)->'{}')::text",
'checkbox': "unistr(((form_data::json)->'{}')::text)",
'checkboxes': "unistr(trim(both '\"' from json_array_elements((form_data::json)->'{}')::text))",
'dropdown': "unistr(trim(both '\"' from ((form_data::json)->'{}')::text))",
'email': "unistr(trim(both '\"' from ((form_data::json)->'{}')::text))",
'singleline': "unistr(((form_data::json)->'{}')::text)",
'multiline': "unistr(((form_data::json)->'{}')::text)",
'number': "(form_data::json->>'{}')::DECIMAL",
'positivenumber': "(form_data::json->>'{}')::DECIMAL",
'radio': "trim(both '\"' from ((form_data::json)->'{}')::text)",
'url': "trim(both '\"' from ((form_data::json)->'{}')::text)",
'radio': "unistr(trim(both '\"' from ((form_data::json)->'{}')::text))",
'url': "unistr(trim(both '\"' from ((form_data::json)->'{}')::text))",
}


Expand Down