mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-14 23:59:30 +01:00
Fix for helpers.get_age failing if there's no date
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user