diff --git a/tailbone/views/people.py b/tailbone/views/people.py index 3a54559d..8e8374c4 100644 --- a/tailbone/views/people.py +++ b/tailbone/views/people.py @@ -515,8 +515,7 @@ class PersonView(MasterView): return context def get_context_address(self, address): - person = address.person - return { + context = { 'uuid': address.uuid, 'street': address.street, 'street2': address.street2, @@ -524,9 +523,15 @@ class PersonView(MasterView): 'state': address.state, 'zipcode': address.zipcode, 'display': six.text_type(address), - 'invalid': self.handler.address_is_invalid(person, address), } + model = self.model + if isinstance(address, model.PersonMailingAddress): + person = address.person + context['invalid'] = self.handler.address_is_invalid(person, address) + + return context + def get_context_customers(self, person): data = [] for cp in person._customers: