mirror of https://github.com/jumpserver/jumpserver
feat(applications): 修改ApplicationAPI方法method判断->action
parent
b7bd88b8a0
commit
cc30b766f8
|
@ -31,7 +31,7 @@ class ApplicationViewSet(OrgBulkModelViewSet):
|
||||||
attrs_cls = None
|
attrs_cls = None
|
||||||
if app_type:
|
if app_type:
|
||||||
attrs_cls = models.Category.get_type_serializer_cls(app_type)
|
attrs_cls = models.Category.get_type_serializer_cls(app_type)
|
||||||
elif self.request.method.lower() in ['get', 'options', 'head']:
|
elif self.action in ['list', 'retrieve', 'metadata']:
|
||||||
if app_category:
|
if app_category:
|
||||||
attrs_cls = models.Category.get_category_serializer_cls(app_category)
|
attrs_cls = models.Category.get_category_serializer_cls(app_category)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue