Commit 9d58ddd3 authored by Patrick's avatar Patrick
Browse files

Trap AttributeError if delivery_point doesn't exists

parent d2ceb94d
...@@ -74,7 +74,7 @@ class DeliveryBoard(TranslatableModel): ...@@ -74,7 +74,7 @@ class DeliveryBoard(TranslatableModel):
def get_delivery_display(self, admin=False): def get_delivery_display(self, admin=False):
try: try:
short_name = "%s" % self.delivery_point.short_name short_name = "%s" % self.delivery_point.short_name
except TranslationDoesNotExist: except (TranslationDoesNotExist, AttributeError):
short_name = EMPTY_STRING short_name = EMPTY_STRING
if admin: if admin:
if self.delivery_date is not None: if self.delivery_date is not None:
......
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