Skip to content

fix: ensure permalinks are generated for entities with null permalinks during move operations#162

Merged
groksrc merged 1 commit intomainfrom
claude/issue-155-20250620_134617
Jun 25, 2025
Merged

fix: ensure permalinks are generated for entities with null permalinks during move operations#162
groksrc merged 1 commit intomainfrom
claude/issue-155-20250620_134617

Conversation

@phernandez
Copy link
Member

Fixes #155

This PR resolves the validation error that occurs when moving entities with null permalinks from the database migration.

Changes

  • Modified move_entity method to generate permalinks when old_permalink is None
  • Added comprehensive test to verify fix works correctly
  • Ensures EntityResponse validation succeeds after move operations

Backward Compatibility

The fix maintains full backward compatibility with the update_permalinks_on_move setting while preventing validation errors for migrated entities.

Generated with Claude Code

…s during move operations

This fixes issue #155 where moving entities with null permalinks (from database migration)
would cause validation errors when creating EntityResponse objects.

Changes:
- Modified move_entity method to generate permalinks when old_permalink is None
- Added comprehensive test to verify fix works correctly
- Test confirms EntityResponse validation succeeds after move operation

The fix ensures backward compatibility with the update_permalinks_on_move setting while
preventing validation errors for migrated entities with null permalinks.

Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
@groksrc
Copy link
Member

groksrc commented Jun 24, 2025

:shipit:

@groksrc groksrc merged commit f506507 into main Jun 25, 2025
9 checks passed
@groksrc groksrc deleted the claude/issue-155-20250620_134617 branch June 25, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Validation error moving a file in basic memory

2 participants