Make sure that max_length[0][0] is comparable with new_length

This commit is contained in:
Aditya Hase 2017-08-09 16:11:24 +05:30
parent c275f8fcfd
commit 5cc6903cd5

View file

@ -127,7 +127,7 @@ class DbTable:
else:
raise
if max_length and max_length[0][0] > new_length:
if max_length and max_length[0][0] and max_length[0][0] > new_length:
current_type = self.current_columns[col.fieldname]["type"]
current_length = re.findall('varchar\(([\d]+)\)', current_type)
if not current_length: