Commit e204655e authored by fred's avatar fred
Browse files

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

parent 764eeb8d
......@@ -8,6 +8,7 @@ import urllib2
from django.core.files import File
from 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
slug = article.url.lower()
if slug.startswith('nouvel-article'):
# <sigh/>
slug = slugify(article.title)
episode = Episode.objects.get(slug=slug)
except Episode.DoesNotExist:
Supports Markdown
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