feat: account code extraction with zero-padding
This commit is contained in:
@@ -14,5 +14,15 @@ def parse_options(options_str):
|
||||
return options
|
||||
|
||||
|
||||
def get_account_code(options):
|
||||
km = options.get('KmManagment', 'Default')
|
||||
if km == 'Default' or not km.startswith('MG'):
|
||||
return None
|
||||
code = km[2:]
|
||||
if not code.isdigit():
|
||||
return None
|
||||
return code.zfill(8)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user