sql: use category slug to build category view name (#24819)

This commit is contained in:
Frédéric Péters 2018-06-27 15:53:30 +02:00
parent b4956a60bb
commit 85943dfd5b
1 changed files with 1 additions and 1 deletions

View File

@ -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))