From 5a745254466024d3d6a932e74d152a4ed069beb9 Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Thu, 18 Aug 2011 10:31:52 -0400 Subject: [PATCH] Ensure that the slug is always within the 50 characters it needs to be. --- categories/management/commands/import_categories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/categories/management/commands/import_categories.py b/categories/management/commands/import_categories.py index 1435636..76dc605 100644 --- a/categories/management/commands/import_categories.py +++ b/categories/management/commands/import_categories.py @@ -29,7 +29,7 @@ class Command(BaseCommand): """ return Category.objects.create( name=string.strip(), - slug=slugify(string.strip()), + slug=slugify(string.strip())[:49], parent=parent, order=order )