wrolpi/modules/archive
lrnselfreliance 98ceb67321
A malformed entry stops a backup preview or merge with an error naming it (#896)
* A malformed entry stops a backup preview or merge with an error naming it

Backup previews and merges read every config entry as well-formed: a malformed one (an entry that is not a
mapping, a missing or non-text identity, a short tag_files line) raised an AttributeError or TypeError, so the
preview was a 500 and a merge failed with a generic message.  `ConfigFile.backup_entries` now checks each entry
a preview or merge reads, in the backup and in the current config, and raises InvalidConfig naming the file and
the entry; the merge endpoint passes that message on.  A malformed entry may be corrupt, so it is not skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A falsy "tags" that is not a mapping is an error in a backup preview or merge

`tags: []`, `''`, `0` or `false` became no tags through `or dict()` before the mapping check.  Only a missing
or null `tags` means no tags now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 20:59:49 -06:00
..
test An archive detects a browser when the configured one is not installed (#895) 2026-10-27 18:59:00 -06:00
__init__.py An archive detects a browser when the configured one is not installed (#895) 2026-10-27 18:59:00 -06:00
api.py Archive and doc pages record a view in its own write transaction (#813) 2026-10-11 14:13:50 -06:00
conftest.py test: do not leave videos_destination as an invalid template (#656) 2026-08-11 18:51:06 -06:00
errors.py Adding toggle to Channel page to stop downloading comments for certain channels. 2025-03-01 18:23:29 -07:00
lib.py A malformed entry stops a backup preview or merge with an error naming it (#896) 2026-10-27 20:59:49 -06:00
models.py Apply the offset in a SingleFile saved date, and repair misread Archive dates (#862) 2026-10-23 14:34:29 -06:00
schema.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00