Commit d3dcdfc4 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[caissedepargne] fix check allow transfer

Page could be redirected to IndexPage if transfer is not allowed

TransferPage inherit from IndexPage so self.home.is_here() is true
Avoid this problem with check type of self.page
parent 541dbea1
......@@ -669,7 +669,8 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
# - need to relogin, see `self.page.need_auth()`
# - need more security, see `self.page.transfer_unavailable()`
# - transfer is not available for this connection, see `self.page.go_transfer_via_history()`
self.home.is_here(),
# TransferPage inherit from IndexPage so self.home.is_here() is true, check page type to avoid this problem
type(self.page) is IndexPage,
# check if origin_account have recipients
self.transfer.is_here() and not self.page.can_transfer(origin_account),
)
......
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