Skip to content

Commit

Permalink
BugFix: Update row on value changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 committed Feb 8, 2021
1 parent de71658 commit 42efc34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fyle_accounting_mappings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ def bulk_upsert_destination_attributes(attributes: List[Dict], workspace_id):
for attribute in attributes:
destination_attribute, _ = DestinationAttribute.objects.update_or_create(
attribute_type=attribute['attribute_type'],
value=attribute['value'],
destination_id=attribute['destination_id'],
workspace_id=workspace_id,
defaults={
'active': attribute['active'] if 'active' in attribute else None,
'display_name': attribute['display_name'],
'destination_id': attribute['destination_id'],
'value': attribute['value'],
'detail': attribute['detail'] if 'detail' in attribute else None
}
)
Expand Down

0 comments on commit 42efc34

Please sign in to comment.