Skip to content

Commit

Permalink
Add temporary debug annotation to verify section hash updates
Browse files Browse the repository at this point in the history
This refs WEB-3995
  • Loading branch information
laulaz committed Sep 10, 2024
1 parent 0212448 commit a983cc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Changelog
1.2.69 (unreleased)
-------------------

- Nothing changed yet.
- WEB-3995 : Add temporary debug annotation to verify section hash updates
[laulaz, remdub]


1.2.68 (2024-09-09)
Expand Down
6 changes: 6 additions & 0 deletions src/imio/smartweb/core/contents/sections/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from Acquisition import aq_inner
from imio.smartweb.common.utils import get_vocabulary
from imio.smartweb.common.utils import is_log_active
from imio.smartweb.common.utils import translate_vocabulary_term
from imio.smartweb.core.utils import hash_md5
from imio.smartweb.core.utils import reindexParent
Expand Down Expand Up @@ -161,3 +162,8 @@ def refresh_modification_date(self):
alsoProvides(self.request, IDisableCSRFProtection)
modified(self.context)
annotations[SECTION_ITEMS_HASH_KEY] = new_hash
if is_log_active():
if "JSONS" in annotations:
annotations["JSONS"].append(self.json_data)
else:
annotations["JSONS"] = [self.json_data]

0 comments on commit a983cc9

Please sign in to comment.