Skip to content
Snippets Groups Projects
Commit b0c61179 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'bw_tag_fix' into 'develop'

Implemented additional checks to prevent SQL failures during processing of bad...

See merge request !424
parents 68783a93 58b2e003
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!424Implemented additional checks to prevent SQL failures during processing of bad...
...@@ -100,8 +100,11 @@ class Posts(DbAdapterHolder): ...@@ -100,8 +100,11 @@ class Posts(DbAdapterHolder):
pass pass
tags = [] tags = []
if md and 'tags' in md and isinstance(md['tags'], list): if md and 'tags' in md and isinstance(md['tags'], list):
tags = md['tags'] for tag in md['tags']:
if tag and isinstance(tag, str):
tags.append(tag) # No escaping needed due to used sqlalchemy formatting features
sql = """ sql = """
SELECT is_new_post, id, author_id, permlink_id, post_category, parent_id, community_id, is_valid, is_muted, depth SELECT is_new_post, id, author_id, permlink_id, post_category, parent_id, community_id, is_valid, is_muted, depth
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment