]> git.parisson.com Git - teleforma.git/commitdiff
fix stream export against long slugs
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 15 Jun 2021 08:54:31 +0000 (10:54 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 15 Jun 2021 08:54:31 +0000 (10:54 +0200)
teleforma/management/commands/teleforma-export-stream-m-slugs.py

index fd3a9054270fc9d3fda332cb256139eac2391d98..497c4f42feffdecb8199b9dc89bcd41754d728c4 100644 (file)
@@ -41,7 +41,7 @@ streams.monitor.limit=100
         for course in courses:
             for type in types:
                 slug = course.slug + '-' + type.name.lower()
-                slug = course.department.name.lower() + '-' + slug
+                slug = course.department.name.lower() + '-' + slug.replace(' ', '-')
                 self.data += '\nstreams.' + slug + '=true\n'
                 self.data += 'streams.' + slug + '.password=' + self.passwd + '\n'
                 self.data += 'streams.' + slug + '.limit=1000\n'