Skip to content

Commit

Permalink
fix: minor keys fixes QBD support items (#101)
Browse files Browse the repository at this point in the history
* fix: minor keys fixes

* docker compose
  • Loading branch information
anishfyle authored Aug 5, 2024
1 parent fe73397 commit e3bfbd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/qbd/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit e3bfbd2

Please sign in to comment.