fix: show continuum operation type when viewing version history

This commit is contained in:
Lance Edgar 2024-11-12 18:28:41 -06:00
parent 772b6610cb
commit 9e55717041
2 changed files with 6 additions and 1 deletions

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2023 Lance Edgar
# Copyright © 2010-2024 Lance Edgar
#
# This file is part of Rattail.
#
@ -27,6 +27,8 @@ Tools for displaying data diffs
import sqlalchemy as sa
import sqlalchemy_continuum as continuum
from rattail.enum import CONTINUUM_OPERATION
from pyramid.renderers import render
from webhelpers2.html import HTML
@ -273,6 +275,8 @@ class VersionDiff(Diff):
return {
'key': id(self.version),
'model_title': self.title,
'operation': CONTINUUM_OPERATION.get(self.version.operation_type,
self.version.operation_type),
'diff_class': self.nature,
'fields': self.fields,
'values': values,

View file

@ -196,6 +196,7 @@
<p class="block has-text-weight-bold">
{{ version.model_title }}
({{ version.operation }})
</p>
<table class="diff monospace is-size-7"