perf: remove org api scope

pull/13570/head
ibuler 2024-07-02 13:55:46 +08:00 committed by 老广
parent 5594b25ae0
commit 22788ff2da
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ class LabelRelatedField(serializers.RelatedField):
from labels.models import LabeledResource, Label
if data is None:
return data
if isinstance(data, dict) and data.get("id") or data.get("pk"):
if isinstance(data, dict) and (data.get("id") or data.get("pk")):
pk = data.get("id") or data.get("pk")
label = Label.objects.get(pk=pk)
else:

View File

@ -24,7 +24,7 @@ class RoleViewSet(JMSModelViewSet):
}
ordering = ('-builtin', 'name')
filterset_class = RoleFilter
search_fields = ('name', 'scope', 'builtin')
search_fields = ('name', 'builtin')
rbac_perms = {
'users': 'rbac.view_rolebinding'
}