else branch would cause NameError: name 'portal_type' is not defined
else
NameError: name 'portal_type' is not defined