fix: only show "create row" button if batch view supports it
This commit is contained in:
parent
fa2a90c9cc
commit
90784cecb2
2 changed files with 2 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ class BatchMasterView(MasterView):
|
|||
g.set_renderer("status_code", self.render_row_status)
|
||||
|
||||
# tool button - create row
|
||||
if not batch.executed and self.has_perm("create_row"):
|
||||
if self.rows_creatable and not batch.executed and self.has_perm("create_row"):
|
||||
button = self.make_button(
|
||||
f"New {self.get_row_model_title()}",
|
||||
primary=True,
|
||||
|
|
|
|||
|
|
@ -442,6 +442,7 @@ class TestBatchMasterView(WebTestCase):
|
|||
mod.BatchMasterView,
|
||||
model_class=MockBatch,
|
||||
route_prefix="mock_batches",
|
||||
rows_creatable=True,
|
||||
create=True,
|
||||
):
|
||||
with patch.object(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue