diff --git a/.github/workflows/qa_deployment.yml b/.github/workflows/qa_deployment.yml index df45571f..3917a1bc 100644 --- a/.github/workflows/qa_deployment.yml +++ b/.github/workflows/qa_deployment.yml @@ -14,6 +14,8 @@ jobs: environment: QA steps: - uses: actions/checkout@v2 + with: + submodules: recursive - name: push to dockerhub uses: fylein/docker-release-action@master env: diff --git a/apps/netsuite/connector.py b/apps/netsuite/connector.py index 8f2cc020..17b9f3f7 100644 --- a/apps/netsuite/connector.py +++ b/apps/netsuite/connector.py @@ -104,16 +104,28 @@ def sync_accounts(self): 'active': not account['isInactive'] }) - attributes['credit_card_account'].append({ - 'attribute_type': 'CREDIT_CARD_ACCOUNT', - 'display_name': 'Credit Card Account', - 'value': account['acctName'], - 'destination_id': account['internalId'], - 'detail': { - 'account_type': account['acctType'] - }, - 'active': not account['isInactive'] - }) + if settings.BRAND_ID == 'fyle': + attributes['credit_card_account'].append({ + 'attribute_type': 'CREDIT_CARD_ACCOUNT', + 'display_name': 'Credit Card Account', + 'value': account['acctName'], + 'destination_id': account['internalId'], + 'detail': { + 'account_type': account['acctType'] + }, + 'active': not account['isInactive'] + }) + elif account['acctType'] == '_creditCard': + attributes['credit_card_account'].append({ + 'attribute_type': 'CREDIT_CARD_ACCOUNT', + 'display_name': 'Credit Card Account', + 'value': account['acctName'], + 'destination_id': account['internalId'], + 'detail': { + 'account_type': account['acctType'] + }, + 'active': not account['isInactive'] + }) if account['acctType'] == '_accountsPayable': attributes['accounts_payable'].append({