summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
Diffstat (limited to 'news')
-rw-r--r--news/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/news/views.py b/news/views.py
index 268f0523..03f3b0ac 100644
--- a/news/views.py
+++ b/news/views.py
@@ -13,7 +13,8 @@ from .models import News
def find_unique_slug(newsitem):
'''Attempt to find a unique slug for this news item.'''
- existing = list(News.objects.values_list('slug', flat=True).distinct())
+ existing = list(News.objects.values_list(
+ 'slug', flat=True).order_by().distinct())
suffixed = slug = slugify(newsitem.title)
suffix = 0