fix: show continuum operation type when viewing version history
This commit is contained in:
parent
772b6610cb
commit
9e55717041
|
@ -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,
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
|
||||
<p class="block has-text-weight-bold">
|
||||
{{ version.model_title }}
|
||||
({{ version.operation }})
|
||||
</p>
|
||||
|
||||
<table class="diff monospace is-size-7"
|
||||
|
|
Loading…
Reference in a new issue