fix: swagger

This commit is contained in:
xinwen
2022-02-21 18:51:11 +08:00
committed by Jiangjie.Bai
parent ad2cb233d7
commit f460916e84
8 changed files with 24 additions and 5 deletions

View File

@@ -166,6 +166,9 @@ class CommandViewSet(JMSBulkModelViewSet):
def get_queryset(self):
command_storage_id = self.request.query_params.get('command_storage_id')
if not command_storage_id:
return Command.objects.none()
storage = CommandStorage.objects.get(id=command_storage_id)
if not storage.is_valid():
raise StorageInvalid