Skip to content

Add scan_date to import settings if overridden#14502

Merged
mtesauro merged 5 commits intobugfixfrom
Maffooch-patch-1
Mar 27, 2026
Merged

Add scan_date to import settings if overridden#14502
mtesauro merged 5 commits intobugfixfrom
Maffooch-patch-1

Conversation

@Maffooch
Copy link
Copy Markdown
Contributor

This pull request introduces a minor update to the import settings logic in the update_import_history method of base_importer.py. The change ensures that the scan_date is included in the import settings only if the scan_date_override flag is set; otherwise, it is set to None.

  • Import Settings Update:

@Maffooch Maffooch requested a review from mtesauro as a code owner March 12, 2026 17:23
@valentijnscholten valentijnscholten added this to the 2.56.2 milestone Mar 12, 2026
@Maffooch Maffooch modified the milestones: 2.56.2, 2.56.3, 2.56.4 Mar 13, 2026
@Maffooch Maffooch closed this Mar 25, 2026
@Maffooch Maffooch reopened this Mar 25, 2026
Maffooch and others added 2 commits March 25, 2026 15:44
Convert scan_date to ISO format string before storing in import_settings
dict, which gets JSON-serialized. Raw datetime objects cause
"TypeError: Object of type datetime is not JSON serializable".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests both cases:
- User supplies scan_date: verifies it's stored as ISO string
- No scan_date supplied: verifies it's stored as None

Both tests also verify import_settings remains JSON-serializable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Maffooch and others added 2 commits March 25, 2026 23:50
Use datetime.timezone.utc instead of django.utils.timezone.utc
which doesn't exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mtesauro mtesauro merged commit 876ff9c into bugfix Mar 27, 2026
549 of 550 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants