sql: use category slug to build category view name (#24819)
This commit is contained in:
parent
b4956a60bb
commit
85943dfd5b
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue