Browse Source

fix: export assets (#10224)

Co-authored-by: feng <1304903146@qq.com>
pull/10226/head
fit2bot 2 years ago committed by GitHub
parent
commit
cff4309b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/assets/serializers/asset/common.py

4
apps/assets/serializers/asset/common.py

@ -3,7 +3,7 @@
import re
from django.db.models import F
from django.db.models import F, QuerySet
from django.db.transaction import atomic
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
@ -200,7 +200,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer, WritableNestedModelSeriali
if not request:
return default_field
if self.instance and isinstance(self.instance, list):
if self.instance and isinstance(self.instance, (QuerySet, list)):
return default_field
if not self.instance and uuid_pattern.findall(request.path):

Loading…
Cancel
Save