pref: 优化 audit log

This commit is contained in:
ibuler
2023-02-20 14:13:22 +08:00
parent 5058d8158d
commit ce2c3d7ce2
4 changed files with 22 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ from ..utils import set_to_root_org
__all__ = [
'RootOrgViewMixin', 'OrgModelViewSet', 'OrgBulkModelViewSet', 'OrgQuerySetMixin',
'OrgGenericViewSet', 'OrgRelationMixin'
'OrgGenericViewSet', 'OrgRelationMixin', 'OrgReadonlyModelViewSet'
]
@@ -62,6 +62,10 @@ class OrgBulkModelViewSet(CommonApiMixin, OrgViewSetMixin, BulkModelViewSet):
return False
class OrgReadonlyModelViewSet(OrgModelViewSet):
http_method_names = ['get', 'head', 'options']
class OrgRelationMixin(RelationMixin):
def get_queryset(self):
queryset = super().get_queryset()