[Bugfix] 资产导入中下载模板异常

pull/915/head
ibuler 2018-01-05 19:09:42 +08:00
parent 9a6bc9fec5
commit c16471d54f
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ class AssetDetailView(DetailView):
class AssetExportView(View):
def get(self, request):
spm = request.GET.get('spm', '')
assets_id_default = [Asset.objects.first().id] if Asset.objects.first() else [1]
assets_id_default = [Asset.objects.first().id] if Asset.objects.first() else []
assets_id = cache.get(spm, assets_id_default)
fields = [
field for field in Asset._meta.fields