Fix URL for user, for feedback email

This commit is contained in:
Lance Edgar 2019-10-08 10:08:13 -05:00
parent fbeb48a021
commit c812519931

View file

@ -155,7 +155,7 @@ class CommonView(View):
data = dict(form.validated) data = dict(form.validated)
if data['user']: if data['user']:
data['user'] = Session.query(model.User).get(data['user']) data['user'] = Session.query(model.User).get(data['user'])
data['user_url'] = self.request.route_url('users.view', uuid=data['user']) data['user_url'] = self.request.route_url('users.view', uuid=data['user'].uuid)
data['client_ip'] = self.request.client_addr data['client_ip'] = self.request.client_addr
send_email(self.rattail_config, 'user_feedback', data=data) send_email(self.rattail_config, 'user_feedback', data=data)
return {'ok': True} return {'ok': True}