Refactor approval queue to display last meaningful status #94

Merged
Oleg-Komarov merged 13 commits from approval-queue into main 2024-04-30 10:48:38 +02:00
Showing only changes of commit a5e490903d - Show all commits

View File

@ -4,6 +4,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.db import transaction
from django.shortcuts import get_object_or_404, reverse
from django.utils.translation import gettext_lazy as _
from django.views.generic import DetailView, ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView, FormView
@ -358,6 +359,7 @@ class DraftExtensionView(
):
template_name = 'extensions/draft_finalise.html'
form_class = VersionForm
msg_awaiting_review = _('Extension is ready for initial review')
@property
def success_message(self) -> str:
@ -423,7 +425,7 @@ class DraftExtensionView(
user=self.request.user,
extension=extension_form.instance,
type=ApprovalActivity.ActivityType.AWAITING_REVIEW,
message="initial submission",
message=self.msg_awaiting_review,
).save()
return super().form_valid(form)
except forms.ValidationError as e: