Skip to content

Commit 99618e3

Browse files
anishfyleanishfyle
authored andcommitted
fix: minor keys fixes QBD support items (#101)
* fix: minor keys fixes * docker compose
1 parent fe73397 commit 99618e3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
continue-on-error: true
1515
- name: Bring up Services and Run Tests
1616
run: |
17-
docker-compose -f docker-compose-pipeline.yml build
18-
docker-compose -f docker-compose-pipeline.yml up -d
19-
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
17+
docker compose -f docker-compose-pipeline.yml build
18+
docker compose -f docker-compose-pipeline.yml up -d
19+
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
2020
echo "STATUS=$(cat pytest-coverage.txt | grep 'Required test' | awk '{ print $1 }')" >> $GITHUB_ENV
2121
echo "FAILED=$(cat test-reports/report.xml | awk -F'=' '{print $5}' | awk -F' ' '{gsub(/"/, "", $1); print $1}')" >> $GITHUB_ENV
2222
- name: Upload coverage reports to Codecov with GitHub Action

apps/qbd/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get_item_and_account_name(field_mapping: FieldMapping, expense: Expense, wor
3232
'_'.join(k.lower().split()).replace(' ', '_'): v
3333
for k, v in custom_properties.items()
3434
}
35-
modified_item_type = item_type = '_'.join(item_type.lower().split()).replace(' ', '_')
35+
modified_item_type = '_'.join(item_type.lower().split()).replace(' ', '_')
3636
expense_item = custom_properties.get(modified_item_type)
3737

3838
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
4242
source_value=expense_item).first()
4343

4444
if item_mapped_account:
45-
return expense_item, item_mapped_account
45+
return expense_item, item_mapped_account.destination_value
4646

4747
return '', expense_category
4848

0 commit comments

Comments
 (0)