From 1d634bd04be77cac8928241edd11eb8cf38672fe Mon Sep 17 00:00:00 2001 From: anishfyle Date: Fri, 2 Aug 2024 20:29:22 +0530 Subject: [PATCH 1/2] fix: minor keys fixes --- apps/qbd/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/qbd/models.py b/apps/qbd/models.py index fb2083f..5d73953 100644 --- a/apps/qbd/models.py +++ b/apps/qbd/models.py @@ -32,7 +32,7 @@ def get_item_and_account_name(field_mapping: FieldMapping, expense: Expense, wor '_'.join(k.lower().split()).replace(' ', '_'): v for k, v in custom_properties.items() } - modified_item_type = item_type = '_'.join(item_type.lower().split()).replace(' ', '_') + modified_item_type = '_'.join(item_type.lower().split()).replace(' ', '_') expense_item = custom_properties.get(modified_item_type) if item_type and expense_item and expense_category: @@ -42,7 +42,7 @@ def get_item_and_account_name(field_mapping: FieldMapping, expense: Expense, wor source_value=expense_item).first() if item_mapped_account: - return expense_item, item_mapped_account + return expense_item, item_mapped_account.destination_value return '', expense_category From 61457f2ddf4ab386f6d3f735626cf80088e47955 Mon Sep 17 00:00:00 2001 From: anishfyle Date: Mon, 5 Aug 2024 12:14:48 +0530 Subject: [PATCH 2/2] docker compose --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a8cbb81..daa423b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,9 +14,9 @@ jobs: continue-on-error: true - name: Bring up Services and Run Tests run: | - docker-compose -f docker-compose-pipeline.yml build - docker-compose -f docker-compose-pipeline.yml up -d - docker-compose -f docker-compose-pipeline.yml exec -T api pytest tests/ --cov --junit-xml=test-reports/report.xml --cov-report=xml --cov-fail-under=97 + docker compose -f docker-compose-pipeline.yml build + docker compose -f docker-compose-pipeline.yml up -d + docker compose -f docker-compose-pipeline.yml exec -T api pytest tests/ --cov --junit-xml=test-reports/report.xml --cov-report=xml --cov-fail-under=97 echo "STATUS=$(cat pytest-coverage.txt | grep 'Required test' | awk '{ print $1 }')" >> $GITHUB_ENV echo "FAILED=$(cat test-reports/report.xml | awk -F'=' '{print $5}' | awk -F' ' '{gsub(/"/, "", $1); print $1}')" >> $GITHUB_ENV - name: Upload coverage reports to Codecov with GitHub Action