Commit ccef0c48 authored by Baptiste Jonglez's avatar Baptiste Jonglez

[fix] forgot some corner cases... oops

parent 9a9c3130
......@@ -22,14 +22,23 @@ def country(code):
status_map=dict(STATUS)
@register.filter(name='status')
def status(code):
return status_map[code]
try:
return status_map[code]
except:
return code
type_map=dict(TYPES)
@register.filter(name='type')
def type(code):
return type_map[code]
try:
return type_map[code]
except:
return code
media_map=dict(MEDIA)
@register.filter(name='media')
def media(code):
return media_map[code]
try:
return media_map[code]
except:
return code
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment