diff options
| author | 2019-02-06 22:11:56 +0100 | |
|---|---|---|
| committer | 2019-02-06 22:11:56 +0100 | |
| commit | 0b77f476f4eac22a617470ede29bf87df0a7524a (patch) | |
| tree | 3a27887e4928ab869c4f1d444741a0668ec90023 | |
| parent | Use poetry for dependency managemnet. (diff) | |
Define proper update method.
| -rw-r--r-- | api/viewsets.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/api/viewsets.py b/api/viewsets.py index 7ef1ba98..d17d1590 100644 --- a/api/viewsets.py +++ b/api/viewsets.py @@ -866,7 +866,7 @@ class NominationViewSet(ModelViewSet):      queryset = Nomination.objects.prefetch_related('author', 'user')      frozen_fields = ('author', 'inserted_at', 'user') -    def partial_update(self, request, *args, **kwargs): +    def update(self, request, *args, **kwargs):          for field in request.data:              if field in self.frozen_fields:                  raise ValidationError({field: ['This field cannot be updated.']}) | 
