Ignore tags that exceed length limit during import (#1153)

This commit is contained in:
Sascha Ißbrücker
2025-08-10 15:05:10 +02:00
committed by GitHub
parent 5cc8c9c010
commit 1e56b0e6f3
2 changed files with 33 additions and 0 deletions

View File

@@ -96,6 +96,13 @@ def _create_missing_tags(netscape_bookmarks: List[NetscapeBookmark], user: User)
for netscape_bookmark in netscape_bookmarks:
for tag_name in netscape_bookmark.tag_names:
# Skip tag names that exceed the maximum allowed length
if len(tag_name) > 64:
logger.warning(
f"Ignoring tag '{tag_name}' (length {len(tag_name)}) as it exceeds maximum length of 64 characters"
)
continue
tag = tag_cache.get(tag_name)
if not tag:
tag = Tag(name=tag_name, owner=user)