Commit 3215a426 authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by Vincent A

[creditdunord] Handle ActionNeeded after login

The message ask the user to validate the GDPR. The message we display is
just 'GDPR' since there is no clear message to display.
parent 975ea71d
......@@ -194,6 +194,11 @@ class LabelsPage(LoggedPage, JsonPage):
class ProfilePage(LoggedPage, JsonPage):
def get_profile(self):
if CleanText(Dict('commun/statut', default=''))(self.doc) == 'nok':
reason = CleanText(Dict('commun/raison', default=''))(self.doc)
assert reason == 'GDPR', 'Unhandled error : %s' % reason
raise ActionNeeded(reason)
profile = Profile() = Format('%s %s', CleanText(Dict('donnees/nom')), CleanText(Dict('donnees/prenom'), default=''))(self.doc)
return profile
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