Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Guard against if version is None
Browse files Browse the repository at this point in the history
  • Loading branch information
robhudson committed May 31, 2013
1 parent 4846e46 commit 9f68673
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mkt/webapps/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,11 @@ def extract_document(cls, pk, obj=None):
if obj.support_email else None)
d['support_url'] = (unicode(obj.support_url)
if obj.support_url else None)
d['supported_locales'] = filter(None,
version.supported_locales.split(','))
if version:
d['supported_locales'] = filter(
None, version.supported_locales.split(','))
else:
d['supported_locales'] = []

if obj.upsell:
upsell_obj = obj.upsell.premium
Expand Down

0 comments on commit 9f68673

Please sign in to comment.