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