summaryrefslogtreecommitdiff
path: root/news/migrations/0005_add_slugs.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-22 00:36:57 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-22 00:36:57 -0400
commitdf7a6aa620af6a165bdacd755757f8cb1179331c (patch)
tree384b4c62d1f50d8effb733d81d2a810666807624 /news/migrations/0005_add_slugs.py
parent94f972bb892dbf9a86f089f1872ae6d849c0cd0e (diff)
parenta22557811a24b68ef85d4271787c48d8d1e4fc99 (diff)
Merge branch 'archweb-generic2'
Conflicts: README.BRANDING local_settings.py.example packages/templatetags/package_extras.py public/views.py releng/views.py settings.py sitestatic/archnavbar/archnavbar.css sitestatic/silhouette.png templates/base.html templates/packages/differences.html templates/packages/opensearch.xml templates/packages/search.html templates/public/donate.html templates/public/download.html templates/public/feeds.html templates/public/index.html urls.py
Diffstat (limited to 'news/migrations/0005_add_slugs.py')
-rw-r--r--news/migrations/0005_add_slugs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/news/migrations/0005_add_slugs.py b/news/migrations/0005_add_slugs.py
index 2a3b6174..96bd5213 100644
--- a/news/migrations/0005_add_slugs.py
+++ b/news/migrations/0005_add_slugs.py
@@ -11,7 +11,7 @@ class Migration(DataMigration):
def forwards(self, orm):
existing = list(orm.News.objects.values_list(
'slug', flat=True).distinct())
- for item in orm.News.objects.all():
+ for item in orm.News.objects.defer('content').filter(slug=None):
suffixed = slug = slugify(item.title)
suffix = 1
while suffixed in existing:
@@ -24,7 +24,7 @@ class Migration(DataMigration):
item.save()
def backwards(self, orm):
- orm.News.obects.all.update(slug=None)
+ orm.News.objects.all.update(slug=None)
models = {
'auth.group': {