Commit 876ff9c
Add scan_date to import settings if overridden (#14502)
* Add scan_date to import settings if overridden
* Fix datetime JSON serialization in import_settings
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>
* Add unit tests for scan_date in import_settings
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>
* Fix timezone import in scan_date test
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>
* Fix ruff lint: import sorting and use datetime.UTC alias
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d61da2c commit 876ff9c
2 files changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| 466 | + | |
466 | 467 | | |
467 | 468 | | |
468 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
0 commit comments