Skip to content
Browse files

Made Release.objects.current_version() more fail more silently.

This makes tests run better, and also breaks the dependancy of having to
have a current release for the site to run.
  • Loading branch information...
1 parent 3ef73cf commit 7ab5f9f7f2ce69afda679ed3467c9bb307e1d0a6 @jacobian jacobian committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 releases/
6 releases/
@@ -22,11 +22,11 @@ def current(self):
return'-minor', '-micro')[0]
def current_version(self):
- current_version = cache.get(Release.DEFAULT_CACHE_KEY)
- if not current_version:
+ current_version = cache.get(Release.DEFAULT_CACHE_KEY, None)
+ if current_version is None:
current_version = self.current().version
- except Release.DoesNotExist:
+ except (Release.DoesNotExist, IndexError):
current_version = ''

0 comments on commit 7ab5f9f

Please sign in to comment.
Something went wrong with that request. Please try again.