diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-12-26 10:46:17 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-12-26 10:46:17 +0700 |
| commit | 01a5286fd37137879b702fbb333a3f0cdf21e172 (patch) | |
| tree | 560d66d78280a8e8ea762c062059a8db010226ad /indoteknik_api/controllers/api_v1/user.py | |
| parent | 217963147ff6f422de2db818e1836816f85cec46 (diff) | |
Fix bug api account activation request
Diffstat (limited to 'indoteknik_api/controllers/api_v1/user.py')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/user.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_api/controllers/api_v1/user.py b/indoteknik_api/controllers/api_v1/user.py index 46ac82ae..0477c134 100644 --- a/indoteknik_api/controllers/api_v1/user.py +++ b/indoteknik_api/controllers/api_v1/user.py @@ -111,6 +111,7 @@ class Auth(controller.Controller): return self.response({ 'activation_request': True, 'token': user.activation_token, + 'user': request.env['res.users'].api_single_response(user) }) @http.route(prefix + 'user/<id>', auth='public', methods=['PUT', 'OPTIONS'], csrf=False) @@ -134,8 +135,7 @@ class Auth(controller.Controller): allowed_field = ['name', 'phone', 'mobile', 'password'] for field in allowed_field: field_value = kw.get(field) - if field_value: - user[field] = field_value + user[field] = field_value return self.response({ 'user': self.response_with_token(user) |
