Refactor approval queue to display last meaningful status #94
@ -66,6 +66,14 @@ class DraftMixin:
|
||||
"""If the extension is incomplete, returns the FinalizeDraftView"""
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if (
|
||||
'slug' in kwargs
|
||||
and Extension.objects.filter(
|
||||
slug=kwargs['slug'], status=Extension.STATUSES.APPROVED
|
||||
).first()
|
||||
):
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
extension = (
|
||||
Extension.objects.listed_or_authored_by(user_id=self.request.user.pk)
|
||||
.filter(status=Extension.STATUSES.INCOMPLETE)
|
||||
|
@ -7,3 +7,10 @@ class FilesConfig(AppConfig):
|
||||
|
||||
def ready(self):
|
||||
import files.signals # noqa: F401
|
||||
|
||||
# Ubuntu 22.04 and earlier don't have WebP in `/etc/mime.types`,
|
||||
# which makes .webp invalid from standpoint of file upload forms.
|
||||
# FIXME: remove once the application is running on the next Ubuntu 24.04 LTS
|
||||
import mimetypes
|
||||
|
||||
mimetypes.add_type('image/webp', '.webp', strict=True)
|
||||
|
Loading…
Reference in New Issue
Block a user