Skip to content

Commit

Permalink
Merge branch 'history-diff-view' into 'main'
Browse files Browse the repository at this point in the history
History diff view

See merge request reportcreator/reportcreator!402
  • Loading branch information
MWedl committed Jan 11, 2024
2 parents a64d93c + 13256f5 commit f681dfa
Show file tree
Hide file tree
Showing 43 changed files with 16,980 additions and 10,477 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Next
* Diff-view for version history


## v2024.3 - 2024-01-09
* Fix PDF viewer crash in Chrome with Bitwarden browser extension

Expand Down
2 changes: 1 addition & 1 deletion api/src/reportcreator_api/tests/test_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setUp(self):
def render_html(self, template, additional_data={}):
def render_only_html(data, language, **kwargs):
html, msgs = render_to_html(template=template, styles='@import url("/assets/global/base.css");', data=merge(data, additional_data), resources={}, language=language)
return html.encode() if html else None, [m.to_dict() for m in msgs]
return html.encode() if html else None, msgs

with mock.patch('reportcreator_api.tasks.rendering.render.render_pdf', render_only_html):
res = async_to_sync(render_pdf)(self.project)
Expand Down
4 changes: 3 additions & 1 deletion api/src/reportcreator_api/utils/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ def history_context(override_existing=False, history_date=None, **kwargs):
Set history context information such as history_date, history_change_reason, history_prevent_cleanup, etc.
If override_existing is False, context information set in an outer history_context() call will not be overwritten and only new infos will be added.
"""
kwargs = kwargs | {'history_date': history_date or timezone.now()}
kwargs = {
'history_date': history_date or timezone.now()
} | kwargs
restore_map = {}
try:
for k, v in kwargs.items():
Expand Down
Loading

0 comments on commit f681dfa

Please sign in to comment.