Projet

Général

Profil

0001-feeder-use-category_id-to-map-formdef-s-category-to-.patch

Benjamin Dauvergne, 24 février 2020 11:51

Télécharger (1,2 ko)

Voir les différences:

Subject: [PATCH] feeder: use category_id to map formdef's category to primary
 key (#40111)

 wcs_olap/feeder.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
wcs_olap/feeder.py
429 429

  
430 430
        # categories
431 431
        tmp_cat_map = self.create_labeled_table(
432
            'category', enumerate(c.title for c in self.categories), comment='catégorie')
433
        self.categories_mapping = dict((c.slug, tmp_cat_map[c.title]) for c in self.categories)
432
            'category', enumerate(c.title for c in self.categories if c.title), comment='catégorie')
433
        self.categories_mapping = dict((f.schema.category_id, tmp_cat_map[f.schema.category])
434
                                       for f in self.formdefs if f.schema.category_id)
434 435

  
435 436
        self.create_labeled_table('hour', zip(range(0, 24), map(str, range(0, 24))),
436 437
                                  comment='heures')
437
-