Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/instance.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -889,3 +889,5 @@ WEKO_RECORDS_UI_S3_TRANSFER_USE_THREADS = True
WEKO_RECORDS_UI_S3_TRANSFER_MAX_CONCURRENCY = 10
"""Number of threads for multipart upload/download for S3 compatible service transfer. Default is 10."""

WEKO_SEARCH_FIX_ACCESSRIGHTS = True

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Invalid embargo dates block saves

When a record being saved has a file dateValue shaped like YYYY-MM-DD but not representing a valid calendar date, update_embargo_rights accepts any date matching YYYY-MM-DD in its regex, then datetime.strptime raises ValueError for an impossible calendar date such as 2026-02-30. Since json_loader calls this function while saving records, the save fails.

Parse dates defensively and treat invalid calendar values as missing rather than raising.

Prompt for AI agents
In `scripts/instance.cfg` at line 892:

**Invalid embargo dates block saves**

When a record being saved has a file `dateValue` shaped like `YYYY-MM-DD` but not representing a valid calendar date, `update_embargo_rights` accepts any date matching `YYYY-MM-DD` in its regex, then `datetime.strptime` raises `ValueError` for an impossible calendar date such as `2026-02-30`. Since `json_loader` calls this function while saving records, the save fails.

Parse dates defensively and treat invalid calendar values as missing rather than raising.

"""Fix access rights for search indexes. True if fixing access rights."""
Loading