*: handle PermissionError when saving files, ensure permission bits are set correctly
closes #3817 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		| @ -232,7 +232,11 @@ class ApplicationViewSet(UsedByMixin, ModelViewSet): | ||||
|             return Response({}) | ||||
|         if icon: | ||||
|             app.meta_icon = icon | ||||
|             app.save() | ||||
|             try: | ||||
|                 app.save() | ||||
|             except PermissionError as exc: | ||||
|                 LOGGER.warning("Failed to save icon", exc=exc) | ||||
|                 return HttpResponseBadRequest() | ||||
|             return Response({}) | ||||
|         return HttpResponseBadRequest() | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer