[Update] 修改csv render

pull/4019/head
ibuler 2020-05-18 11:52:50 +08:00
parent 5d129fd0da
commit 1540cbdcaa
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ class JMSCSVRender(BaseRenderer):
@staticmethod
def _get_show_fields(fields, template):
if template in ('import', 'update'):
if template == 'import':
return [v for k, v in fields.items() if not v.read_only and k != "org_id" and k != 'id']
elif template == 'update':
return [v for k, v in fields.items() if not v.read_only and k != "org_id"]
else:
return [v for k, v in fields.items() if not v.write_only and k != "org_id"]