Commit e204655e authored by fred's avatar fred

never keep 'nouvel-article,...' as slug

parent 764eeb8d
......@@ -8,6 +8,7 @@ import urllib2
from django.core.files import File
from django.core.management.base import BaseCommand, CommandError
from django.utils.text import slugify
from ...models import Emission, Episode, Diffusion, Category, SoundFile, NewsItem
......@@ -280,6 +281,9 @@ class Command(BaseCommand):
# not set it's probably not really an episode
continue
slug = article.url.lower()
if slug.startswith('nouvel-article'):
# <sigh/>
slug = slugify(article.title)
try:
episode = Episode.objects.get(slug=slug)
except Episode.DoesNotExist:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment