Review: Needs Fixing code review

As you have added another condition, and to accomodate other countries, code 
can be refactored to:

if company:
    country_code = company_vat[0:2].upper()
    if country_code == 'BE':
        party_identifier = company_vat[2:].replace(' ', '')
    elif country_code == 'ES':
        party_identifier = company.sepa_creditor_identifier

Regards.
-- 
https://code.launchpad.net/~acysos-team/banking-addons/banking-addons-spain-party-identifier/+merge/206246
Your team Banking Addons Core Editors is subscribed to branch lp:banking-addons.

-- 
Mailing list: https://launchpad.net/~banking-addons-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~banking-addons-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to