diff --git a/files/methods.py b/files/methods.py index 3ca3a53..ac6b552 100644 --- a/files/methods.py +++ b/files/methods.py @@ -173,7 +173,7 @@ Media becomes private if it gets reported %s times %s\n d = {} d["title"] = title d["msg"] = msg - d["to"] = media.user.email + d["to"] = [media.user.email] notify_items.append(d) if action == "media_added" and media: @@ -211,7 +211,7 @@ URL: %s msg = f"A comment was added on media {media_url}\n" d["title"] = title d["msg"] = msg - d["to"] = media.user.username + d["to"] = [media.user.username] notify_items.append(d) for item in notify_items: diff --git a/files/views.py b/files/views.py index 6f7e7df..5160e65 100644 --- a/files/views.py +++ b/files/views.py @@ -1112,7 +1112,7 @@ class CommentDetail(APIView): Delete comment (DELETE) """ - permission_classes = (permissions.IsAuthenticatedOrReadOnly, IsUserOrEditor) + permission_classes = (IsAuthorizedToAdd,) parser_classes = (JSONParser, MultiPartParser, FormParser, FileUploadParser) def get_object(self, friendly_token):