From fa2a90c9cc151413fc504be67bbc5d706f8e2725 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 2 Jan 2026 19:22:41 -0600 Subject: [PATCH] fix: show proper batch status text, from enum --- src/wuttaweb/views/batch.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wuttaweb/views/batch.py b/src/wuttaweb/views/batch.py index ce306ea..0f028cf 100644 --- a/src/wuttaweb/views/batch.py +++ b/src/wuttaweb/views/batch.py @@ -2,7 +2,7 @@ ################################################################################ # # wuttaweb -- Web App for Wutta Framework -# Copyright © 2024-2025 Lance Edgar +# Copyright © 2024-2026 Lance Edgar # # This file is part of Wutta Framework. # @@ -32,7 +32,7 @@ import markdown from sqlalchemy import orm from wuttaweb.views import MasterView -from wuttaweb.forms.schema import UserRef +from wuttaweb.forms.schema import UserRef, WuttaDictEnum from wuttaweb.forms.widgets import BatchIdWidget @@ -147,6 +147,9 @@ class BatchMasterView(MasterView): # description g.set_link("description") + # status_code + g.set_enum("status_code", self.model_class.STATUS) + def render_batch_id( # pylint: disable=empty-docstring,unused-argument self, batch, key, value ): @@ -191,6 +194,7 @@ class BatchMasterView(MasterView): if self.creating: f.remove("status_code") else: + f.set_node("status_code", WuttaDictEnum(self.request, batch.STATUS)) f.set_readonly("status_code") # created