sbt-idp/cope2n-api/fwd_api/utils/subsidiary.py
2024-02-23 15:50:52 +07:00

11 lines
313 B
Python

from fwd.settings import SUBS
def map_subsidiary_long_to_short(long_sub):
short_sub = SUBS.get(long_sub.upper(), "all")
return short_sub
def map_subsidiary_short_to_long(short_sub):
for k, v in SUBS.items():
if v == short_sub.upper() or v == short_sub:
return k
return "SEAO"