Skip to content

Commit

Permalink
comment fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzylogic2000 committed Jul 4, 2022
1 parent 302c93b commit ca15c1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions adhocracy4/comments_async/api.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from django.apps import apps
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.urls import reverse
from django.urls.exceptions import NoReverseMatch
from django.utils.translation import gettext_lazy as _
from django_filters import rest_framework as filters
from rest_framework import mixins
from rest_framework import status
from rest_framework import viewsets
from rest_framework.exceptions import ValidationError
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response

Expand Down Expand Up @@ -134,9 +134,10 @@ def _save_terms_agreement(self):
}
)
else:
raise PermissionDenied(
raise ValidationError({
'comment':
_("Please agree to the organisation's terms of use.")
)
})

def perform_create(self, serializer):
self._save_terms_agreement()
Expand Down

0 comments on commit ca15c1c

Please sign in to comment.