perf: remove org api scope

This commit is contained in:
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: