Skip to content

Commit

Permalink
fix: minor keys fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anishfyle committed Aug 2, 2024
1 parent fe73397 commit 1d634bd
Showing 1 changed file with 2 additions and 2 deletions.
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 1d634bd

Please sign in to comment.