Skip to content

Commit

Permalink
Fix category import timestamp (#643)
Browse files Browse the repository at this point in the history
* reset timestamp when the item_import is true

* use existing condition
  • Loading branch information
Hrishabh17 committed Jul 11, 2024
1 parent 3972482 commit e6c8662
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/workspaces/apis/import_settings/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def update(self, instance, validated):

# Check if there is a diff in charts of accounts
# Update the last_successful_run_at to None for Category Import Log
if workspace_general_settings.get('charts_of_accounts') != instance.workspace_general_settings.charts_of_accounts:
if workspace_general_settings.get('charts_of_accounts') != instance.workspace_general_settings.charts_of_accounts \
or (workspace_general_settings.get('import_items') and not instance.workspace_general_settings.import_items):
category_import_log = ImportLog.objects.filter(workspace_id=instance.id, attribute_type='CATEGORY').first()

if category_import_log:
Expand Down

0 comments on commit e6c8662

Please sign in to comment.