Changed an attribute guard to work with a reverse relationship attribute (using hasattr()).

- Legacy-Id: 15251
This commit is contained in:
Henrik Levkowetz 2018-06-14 04:35:04 +00:00
parent 159b5daee9
commit bf3074e493

View file

@ -587,7 +587,7 @@ def login(request, extra_context=None):
#
require_consent = []
if user:
if user.person and not user.person.consent:
if hasattr(user, 'person') and not user.person.consent:
person = user.person
if person.name != person.name_from_draft:
require_consent.append("full name")