mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Merge pull request #16820 from rohitwaghchaure/state_code_blank_if_not_matched_with_state_codes
fix: on save of the address, state code field become blank
This commit is contained in:
@@ -343,4 +343,7 @@ def set_state_code(doc, method):
|
|||||||
return
|
return
|
||||||
|
|
||||||
state_codes_lower = {key.lower():value for key,value in state_codes.items()}
|
state_codes_lower = {key.lower():value for key,value in state_codes.items()}
|
||||||
doc.state_code = state_codes_lower.get(doc.get('state','').lower())
|
|
||||||
|
state = doc.get('state','').lower()
|
||||||
|
if state_codes_lower.get(state):
|
||||||
|
doc.state_code = state_codes_lower.get(state)
|
||||||
|
|||||||
Reference in New Issue
Block a user