Commit 2041373a authored by Christophe de Vienne's avatar Christophe de Vienne
Browse files

Fix call_service arguments (closes #4492008)

As is, no way to have the cube do its work.
There should be some unittests that test the whole stack, not only the services.
parent beca335cda1a
...@@ -63,7 +63,8 @@ class ForgottenPasswordSendMailController(controller.Controller): ...@@ -63,7 +63,8 @@ class ForgottenPasswordSendMailController(controller.Controller):
data = self.checked_data() data = self.checked_data()
try: try:
with self.appli.repo.internal_cnx() as cnx: with self.appli.repo.internal_cnx() as cnx:
cnx.call_service('forgotpwd_send_email', data) cnx.call_service(
'forgotpwd_send_email', use_email=data['use_email'])
cnx.commit() cnx.commit()
except ValidationError: except ValidationError:
raise raise
...@@ -143,7 +144,9 @@ class ForgottenPasswordRequestConfirm(controller.Controller): ...@@ -143,7 +144,9 @@ class ForgottenPasswordRequestConfirm(controller.Controller):
def publish(self, rset=None): def publish(self, rset=None):
data = self.checked_data() data = self.checked_data()
with self.appli.repo.internal_cnx() as cnx: with self.appli.repo.internal_cnx() as cnx:
msg = cnx.call_service('forgotpwd_change_passwd', data) msg = cnx.call_service(
'forgotpwd_change_passwd', use_email=data['use_email'],
revocation_id=data['revocation_id'], upassword=data['upassword'])
cnx.commit() cnx.commit()
raise Redirect(self._cw.build_url('pwdreset', __message=msg)) raise Redirect(self._cw.build_url('pwdreset', __message=msg))
......
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