Projet

Général

Profil

0001-misc-add-slug-to-cubes-38597.patch

Valentin Deniaud, 18 décembre 2019 10:36

Télécharger (1,75 ko)

Voir les différences:

Subject: [PATCH] misc: add slug to cubes (#38597)

This also reverts commit 084b0d06b4e8bf5f9eeaee02cd71623e527ca68b,
which has never been actually used.
 tests/conftest.py  | 1 +
 tests/olap.model   | 1 +
 wcs_olap/feeder.py | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)
tests/conftest.py
224 224
orig = olap
225 225
key = olap
226 226
schema = olap
227
cubes_slug = olap-slug
227 228
'''.format(wcs=wcs, model_dir=model_dir, dsn=postgres_db.dsn))
228 229

  
229 230
    from wcs_olap import cmd
tests/olap.model
420 420
   ],
421 421
   "label" : "olap",
422 422
   "name" : "olap",
423
   "slug" : "olap-slug",
423 424
   "pg_dsn" : "dbname=db660834",
424 425
   "search_path" : [
425 426
      "olap",
wcs_olap/feeder.py
105 105
        self.config = config or {}
106 106
        self.model = {
107 107
            'label': self.config.get('cubes_label', schema),
108
            'name': self.config.get('cubes_slug', schema),
108
            'name': schema,
109 109
            'search_path': [schema, 'public'],
110 110
            'pg_dsn': pg_dsn,
111 111
            'cubes': [],
112 112
        }
113
        if 'cubes_slug' in self.config:
114
            self.model['slug'] = self.config['cubes_slug']
113 115
        cube = {
114 116
            'name': 'all_formdata',
115 117
            'label': 'Tous les formulaires',
116
-