Re-add property fields

This commit is contained in:
2023-02-11 18:07:05 +00:00
parent 7afdd39af7
commit bdf8f04210
3 changed files with 25 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import json
from cachalot.api import invalidate
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponse
from mixins.views import AbortSave, ObjectCreate, ObjectDelete, ObjectList, ObjectUpdate
@@ -148,6 +149,8 @@ class AssetRestrictionAPI(APIView):
for pair in restriction.pairs_parsed:
group.allowed[pair] = is_match
group.save()
invalidate(restriction)
invalidate(group)
return HttpResponse(status=status.HTTP_200_OK)
return HttpResponse(status=status.HTTP_400_BAD_REQUEST)