diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-08 15:24:18 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-08 15:24:18 +0700 |
| commit | 2fcddbb073a04ed6ba0e9666a8ab5082a3ef4073 (patch) | |
| tree | d4a3a423adf53ea8c086397abbcfe05a369fe637 /indoteknik_api/models | |
| parent | ec1e2331be248a505d89c00244d6b0fe5bd61c26 (diff) | |
| parent | ce1c714c95f68b07f9b891600ba1e3b88288652c (diff) | |
Merge branch 'production' into iman/telegram
# Conflicts:
# indoteknik_custom/models/__init__.py
Diffstat (limited to 'indoteknik_api/models')
| -rw-r--r-- | indoteknik_api/models/res_users.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indoteknik_api/models/res_users.py b/indoteknik_api/models/res_users.py index b2e8acfe..534898e1 100644 --- a/indoteknik_api/models/res_users.py +++ b/indoteknik_api/models/res_users.py @@ -48,6 +48,7 @@ class ResUsers(models.Model): 'street': user.street or '', 'street2': user.street2 or '', 'city': None, + 'state_id': None, 'district': None, 'sub_district': None, 'zip': user.zip or '', @@ -60,12 +61,18 @@ class ResUsers(models.Model): 'alamat_bisnis': user.street or None, } + if user.state_id: + data['state_id'] = { + 'id': user.state_id.id, + 'name': user.state_id.name + } or None + if user.kota_id: data['city'] = { 'id': user.kota_id.id, 'name': user.kota_id.name } or None - + if user.kecamatan_id: data['district'] = { 'id': user.kecamatan_id.id, |
