Fix for helpers.get_age failing if there's no date

This commit is contained in:
rembo10
2012-10-31 19:22:23 -04:00
parent 3ac6e93eab
commit cf3c4f1ba6

View File

@@ -120,7 +120,10 @@ def now():
def get_age(date):
split_date = date.split('-')
try:
split_date = date.split('-')
except:
return False
try:
days_old = int(split_date[0])*365 + int(split_date[1])*30 + int(split_date[2])