Skip to content

Commit

Permalink
TP2000-1444 Require a current workbasket on workbasket checks and vio…
Browse files Browse the repository at this point in the history
…lations views (#1262)

* Use require_current_workbasket decorator on WorkBasketChecksView

* Use require_current_workbasket decorator on WorkBasketViolations view
  • Loading branch information
dalecannon committed Jul 11, 2024
1 parent 096ff84 commit 497b777
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workbaskets/views/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,9 @@ def last_transaction_in_workbasket(self):
return self.workbasket_transactions().last()


@method_decorator(require_current_workbasket, name="dispatch")
class WorkBasketViolations(SortingMixin, WithPaginationListView):
"""UI endpoint for viewing a specified workbasket's business rule
"""UI endpoint for viewing the current workbasket's business rule
violations."""

model = TrackedModelCheck
Expand Down Expand Up @@ -1182,6 +1183,7 @@ def get_context_data(self, *args, **kwargs):
)


@method_decorator(require_current_workbasket, name="dispatch")
class WorkBasketChecksView(FormView):
template_name = "workbaskets/checks.jinja"
form_class = forms.SelectableObjectsForm
Expand Down

0 comments on commit 497b777

Please sign in to comment.