From d9088aab304676df95c1e2fa59d3883ce93b11c7 Mon Sep 17 00:00:00 2001 From: Caleb Ely <le717@users.noreply.github.com> Date: Tue, 17 Aug 2021 08:06:26 -0400 Subject: [PATCH] Do not update the weblink ID --- CHANGES.md | 3 ++- src/core/database/weblink.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7d5bc24..1e87fae 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,10 @@ # 1.0.3 -_Unreleased_ +_Released August 17, 2021_ - Escape link info on update - Rename gunicorn logs to not clobber other logs with the same name +- Do not update a link ID on link update # 1.0.2 diff --git a/src/core/database/weblink.py b/src/core/database/weblink.py index 9d9bbc1..85372df 100644 --- a/src/core/database/weblink.py +++ b/src/core/database/weblink.py @@ -61,7 +61,7 @@ def update(data: OrderedDict) -> bool: return False db.session.query(WebLink).filter_by(id=data["id"]).update( - {k: Markup(v).striptags() for k, v in data.items()}, + {k: Markup(v).striptags() for k, v in data.items() if k != "id"}, synchronize_session="fetch", ) db.session.commit()