Multi-platform: support multiple files per version #201

Merged
Oleg-Komarov merged 43 commits from multi-os into main 2024-07-09 16:27:46 +02:00
Showing only changes of commit a1ebb51a2a - Show all commits

View File

@ -27,18 +27,13 @@ class ExtensionQuerysetMixin:
class MaintainedExtensionMixin:
"""Fetch an extension by slug if current user is a maintainer.
If pk is present, also fetch a corresponding version.
"""
"""Fetch an extension by slug if current user is a maintainer."""
def dispatch(self, *args, **kwargs):
self.extension = get_object_or_404(
Extension.objects.authored_by(self.request.user),
slug=self.kwargs['slug'],
)
if 'pk' in self.kwargs:
self.version = get_object_or_404(self.extension.versions, pk=self.kwargs['pk'])
return super().dispatch(*args, **kwargs)