feat(chalice): fixed update metadata

This commit is contained in:
Taha Yassine Kraiem 2023-02-21 19:09:05 +01:00
parent 110908693e
commit 2001c5db4d

View file

@ -19,8 +19,8 @@ def __exists_by_name(project_id: int, name: str, exclude_index: Optional[int]) -
constraints = column_names()
if exclude_index:
del constraints[exclude_index - 1]
for c in constraints:
c += " ILIKE %(name)s"
for i in range(len(constraints)):
constraints[i] += " ILIKE %(name)s"
query = cur.mogrify(f"""SELECT EXISTS(SELECT 1
FROM public.projects
WHERE project_id = %(project_id)s