Skip to content

Commit

Permalink
exclude empty string titles
Browse files Browse the repository at this point in the history
  • Loading branch information
zalun committed Jan 9, 2010
1 parent 4513951 commit 63e6c57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion views.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@ def api_get_users_pasties(req, author, limit=50):
user = get_object_or_404(User, username=author)
pasties = Pastie.objects\
.filter(author__username=author)\
.exclude(favourite__title__isnull=True)[:limit]
.exclude(favourite__title__isnull=True)\
.exclude(favourite__title="")\
[:limit]

try:
server = settings.MOOSHELL_FORCE_SERVER
Expand Down

0 comments on commit 63e6c57

Please sign in to comment.