Skip to content

Commit

Permalink
validate if vendor mapped is active (#345)
Browse files Browse the repository at this point in the history
* validate if vendor mapped is active

* fixed comment

* fixed comment

* fixed comment
  • Loading branch information
harshithaputtaswamy authored Oct 25, 2022
1 parent 9acd431 commit 15fc82c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/quickbooks_online/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def __validate_expense_group(expense_group: ExpenseGroup, general_settings: Work
if general_settings.employee_field_mapping == 'EMPLOYEE':
entity = entity.destination_employee
else:
entity = entity.destination_vendor
entity = entity.destination_vendor if entity.destination_vendor and entity.destination_vendor.active else None

if not entity:
raise EmployeeMapping.DoesNotExist
Expand Down

0 comments on commit 15fc82c

Please sign in to comment.