From 3215a426af403762d41f061901a6b35e30671083 Mon Sep 17 00:00:00 2001 From: Guillaume Risbourg Date: Tue, 4 Feb 2020 17:28:03 +0100 Subject: [PATCH] [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. --- modules/creditdunord/pages.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index ecc8dc6d90..06875ab02a 100755 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -194,6 +194,11 @@ def get_labels(self): 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() profile.name = Format('%s %s', CleanText(Dict('donnees/nom')), CleanText(Dict('donnees/prenom'), default=''))(self.doc) return profile -- GitLab