Allow spaces to if_not_exists

This commit is contained in:
Kosei Kitahara 2018-10-11 18:21:53 +09:00
commit 2c15d71c2c
No known key found for this signature in database
GPG key ID: D18883191F02241B
2 changed files with 5 additions and 3 deletions

View file

@ -154,7 +154,7 @@ class Item(BaseModel):
# If not exists, changes value to a default if needed, else its the same as it was
if value.startswith('if_not_exists'):
# Function signature
match = re.match(r'.*if_not_exists\((?P<path>.+),\s*(?P<default>.+)\).*', value)
match = re.match(r'.*if_not_exists\s*\((?P<path>.+),\s*(?P<default>.+)\).*', value)
if not match:
raise TypeError