aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-12-14 21:42:34 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-12-14 21:42:34 +0000
commit889ff3219de529a56c0d679a724d36c6c1af2894 (patch)
tree40493ce8cdc9057f04fac351454f89f6edc063c4
parentAdd 500 template. (diff)
downloadgentoo-ads-889ff3219de529a56c0d679a724d36c6c1af2894.tar.gz
gentoo-ads-889ff3219de529a56c0d679a724d36c6c1af2894.tar.bz2
gentoo-ads-889ff3219de529a56c0d679a724d36c6c1af2894.zip
Fix return.
-rw-r--r--gentoo_ads/ads/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gentoo_ads/ads/views.py b/gentoo_ads/ads/views.py
index 85e19f0..d076f57 100644
--- a/gentoo_ads/ads/views.py
+++ b/gentoo_ads/ads/views.py
@@ -30,7 +30,9 @@ def _build_lang_array(request):
def _match_langs(accept_langs, available_langs):
common_langs = set(accept_langs) & set(available_langs)
for _ in accept_langs:
- return _ if _ in common_langs
+ if _ in common_langs:
+ return _
+ return settings.DEFAULT_ADS_LANG
def _trans_ad(ad, accept_langs):
for k in settings.TRANS_KEYS: