Projet

Général

Profil

0001-sql-use-category-slug-to-build-category-view-name-24.patch

Frédéric Péters, 27 juin 2018 15:54

Télécharger (911 octets)

Voir les différences:

Subject: [PATCH] sql: use category slug to build category view name (#24819)

 wcs/sql.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
wcs/sql.py
866 866
    cur.execute('''CREATE VIEW wcs_all_forms AS %s''' % union)
867 867

  
868 868
    for category in wcs.categories.Category.select():
869
        name = get_name_as_sql_identifier(category.name)[:40]
869
        name = get_name_as_sql_identifier(category.url_name)[:40]
870 870
        cur.execute('''CREATE VIEW wcs_category_%s AS SELECT * from wcs_all_forms
871 871
                        WHERE category_id = %s''' % (name, category.id))
872 872

  
873
-