mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-08-02 03:00:09 +03:00
Update utils.py
Fixed infinitive loop while parsing Array of strings fields.ArrayField(fields.StringField()) If your string has a single quote(stored as escaped \'), repeated unescape will remove \, making it impossible to decode field using the following parse_array. Note, decode function unescapes the bytes the first time.
This commit is contained in:
parent
45a9200ff6
commit
33ab225168
|
@ -81,8 +81,9 @@ def parse_tsv(line):
|
|||
line = line.decode()
|
||||
if line and line[-1] == '\n':
|
||||
line = line[:-1]
|
||||
return [unescape(value) for value in line.split(str('\t'))]
|
||||
|
||||
# Repetitive unescape using undocumented function
|
||||
# return [unescape(value) for value in line.split(str('\t'))]
|
||||
return line.split(str('\t'))
|
||||
|
||||
def parse_array(array_string):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user