From 04fe5590b0f516ac4c096b3fb7849030fa9309f4 Mon Sep 17 00:00:00 2001 From: Martin Sukany Date: Sat, 14 Mar 2026 19:51:05 +0100 Subject: [PATCH] fix: URL persistence in export + cache-busting v4.8.0 - getDocument() now explicitly lists all block fields including url - loadDocument() initializes url/series_id for backward compat with older JSONs - Cache-busting query params (?v=4.8) on all static assets - PDF generator uses block.url directly (proper model field) - Added 7 new URL tests (model, API, PDF link annotations) - Version bumped to 4.8.0 --- app/config.py | 2 +- app/core/pdf_generator.py | 2 +- app/static/index.html | 12 ++++----- app/static/js/app.js | 17 ++++++++++-- tests/test_api.py | 20 ++++++++++++++ tests/test_core.py | 21 +++++++++++++++ tests/test_pdf.py | 57 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 121 insertions(+), 10 deletions(-) diff --git a/app/config.py b/app/config.py index 3397773..594b7ef 100644 --- a/app/config.py +++ b/app/config.py @@ -1,5 +1,5 @@ """Application configuration.""" -VERSION = "4.7.0" +VERSION = "4.8.0" MAX_FILE_SIZE_MB = 10 DEFAULT_COLOR = "#ffffff" diff --git a/app/core/pdf_generator.py b/app/core/pdf_generator.py index e497460..99e84e7 100644 --- a/app/core/pdf_generator.py +++ b/app/core/pdf_generator.py @@ -609,7 +609,7 @@ def generate_pdf(doc) -> bytes: c.restoreState() # If block has a URL, make the entire block a clickable link - if getattr(block, 'url', None): + if block.url: c.linkURL(block.url, (bx + inset, row_y + inset, bx + bw - inset, row_y + row_h - inset), diff --git a/app/static/index.html b/app/static/index.html index a01207d..02cf640 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -7,13 +7,13 @@ - +

Scénář Creator

- v4.7 + v4.8