mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-12-05 03:55:09 +01:00
Fix normalized URL not being generated in bookmark import (#1202)
This commit is contained in:
@@ -8,7 +8,7 @@ from django.utils import timezone
|
||||
from bookmarks.models import Bookmark, Tag
|
||||
from bookmarks.services import tasks
|
||||
from bookmarks.services.parser import parse, NetscapeBookmark
|
||||
from bookmarks.utils import parse_timestamp
|
||||
from bookmarks.utils import normalize_url, parse_timestamp
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -181,6 +181,7 @@ def _import_batch(
|
||||
bookmarks_to_update,
|
||||
[
|
||||
"url",
|
||||
"url_normalized",
|
||||
"date_added",
|
||||
"date_modified",
|
||||
"unread",
|
||||
@@ -234,6 +235,7 @@ def _copy_bookmark_data(
|
||||
netscape_bookmark: NetscapeBookmark, bookmark: Bookmark, options: ImportOptions
|
||||
):
|
||||
bookmark.url = netscape_bookmark.href
|
||||
bookmark.url_normalized = normalize_url(bookmark.url)
|
||||
if netscape_bookmark.date_added:
|
||||
bookmark.date_added = parse_timestamp(netscape_bookmark.date_added)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user