diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-03-17 14:48:40 -0300 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-03-17 14:48:40 -0300 |
commit | e3b3005b8b98dbb689546495c71999a929aed016 (patch) | |
tree | 4cd00cadfec81fe73d81feb6ca680840a85e53f3 /service/pixelated | |
parent | 067db035910c8284d508401c34ca4cb5928c2b52 (diff) |
[#1012] Refactors getting soledad service in BaseResource
with @tayanefernandes
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/resources/__init__.py | 3 | ||||
-rw-r--r-- | service/pixelated/resources/backup_account_resource.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/service/pixelated/resources/__init__.py b/service/pixelated/resources/__init__.py index f5512644..a36d476a 100644 --- a/service/pixelated/resources/__init__.py +++ b/service/pixelated/resources/__init__.py @@ -119,6 +119,9 @@ class BaseResource(Resource): def feedback_service(self, request): return self._service(request, 'feedback_service') + def soledad(self, request): + return self._services(request)._leap_session.soledad + class UnAuthorizedResource(Resource): diff --git a/service/pixelated/resources/backup_account_resource.py b/service/pixelated/resources/backup_account_resource.py index ca32e973..b752b4c7 100644 --- a/service/pixelated/resources/backup_account_resource.py +++ b/service/pixelated/resources/backup_account_resource.py @@ -51,7 +51,7 @@ class BackupAccountResource(BaseResource): def render_POST(self, request): account_recovery = AccountRecovery( self._authenticator.bonafide_session, - self._services(request)._leap_session.soledad) + self.soledad(request)) def update_response(response): request.setResponseCode(NO_CONTENT) |