Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Mar 5, 2023
2 parents 9649cc6 + 1e680d3 commit 986a2f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker-app/qfieldcloud/core/views/files_views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from pathlib import PurePath

import qfieldcloud.core.utils2 as utils2
Expand All @@ -15,6 +16,8 @@
from rest_framework.parsers import MultiPartParser
from rest_framework.response import Response

logger = logging.getLogger(__name__)


class ListFilesViewPermissions(permissions.BasePermission):
def has_permission(self, request, view):
Expand Down Expand Up @@ -135,6 +138,13 @@ def post(self, request, projectid, filename, format=None):
project = Project.objects.get(id=projectid)

if "file" not in request.data:
logger.info(
'The key "file" was not found in `request.data`.',
extra={
"request_data": list(request.data.keys()),
"request_files": list(request.FILES.keys()),
},
)
raise exceptions.EmptyContentError()

is_qgis_project_file = utils.is_qgis_project_file(filename)
Expand Down

0 comments on commit 986a2f1

Please sign in to comment.