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:
commit
55c382a780
@ -343,4 +343,7 @@ def set_state_code(doc, method):
|
||||
return
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user