Commit c16471d5 authored by ibuler's avatar ibuler

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

parent 9a6bc9fe
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment