From 96b4e4953483256ce8b9cd012d5afcfc78de0696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 27 Jun 2018 15:53:30 +0200 Subject: [PATCH] sql: use category slug to build category view name (#24819) --- wcs/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcs/sql.py b/wcs/sql.py index 9258c3e1..c01b3397 100644 --- a/wcs/sql.py +++ b/wcs/sql.py @@ -866,7 +866,7 @@ def do_global_views(conn, cur): cur.execute('''CREATE VIEW wcs_all_forms AS %s''' % union) for category in wcs.categories.Category.select(): - name = get_name_as_sql_identifier(category.name)[:40] + name = get_name_as_sql_identifier(category.url_name)[:40] cur.execute('''CREATE VIEW wcs_category_%s AS SELECT * from wcs_all_forms WHERE category_id = %s''' % (name, category.id)) -- 2.17.1