Commit 669037df authored by Patrick's avatar Patrick
Browse files

Fill short_name with EMPTY_STRING if None

parent e13497fd
......@@ -78,9 +78,13 @@ class DeliveryBoard(TranslatableModel):
comment = EMPTY_STRING
except TranslationDoesNotExist:
comment = EMPTY_STRING
try:
short_name = "%s" % self.delivery_point.short_name
except TranslationDoesNotExist:
short_name = EMPTY_STRING
if self.delivery_date is not None:
label = "%s %s%s" % (
self.delivery_date.strftime(settings.DJANGO_SETTINGS_DATE), comment, self.delivery_point.short_name)
self.delivery_date.strftime(settings.DJANGO_SETTINGS_DATE), comment, short_name)
else:
label = "%s%s" % (comment, self.delivery_point.short_name)
return label
......
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