diff --git a/xls2ddl/tmpls.py b/xls2ddl/tmpls.py index 744a70f..70f95d7 100644 --- a/xls2ddl/tmpls.py +++ b/xls2ddl/tmpls.py @@ -154,6 +154,9 @@ if filterjson and isinstance(filterjson, str): \t\tfilterjson = json.loads(filterjson) \texcept (json.JSONDecodeError, TypeError): \t\tfilterjson = None +# data_filter可能是CRUD字段定义({"fields":[...]}),不是过滤条件,忽略 +if filterjson and isinstance(filterjson, dict) and 'fields' in filterjson: + filterjson = None fields_str=r'''{{json.dumps(fields, indent=4, ensure_ascii=False)}}''' ori_fields = json.loads(fields_str) if not filterjson: