소스 검색

make_model: selects should not be set to []

master
Bing Sun 5 년 전
부모
커밋
b4bdd7ed67
로그인 계정: sunb GPG 키 ID: F7795F8C590626AB
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/util/make_model.js

+ 2
- 2
src/util/make_model.js 파일 보기

@@ -30,7 +30,7 @@ export default (options={}) => {
endpoint: options.endpoint, endpoint: options.endpoint,
endpoint_type: options.endpoint.startsWith('/rpc') ? 'function' : 'relation', endpoint_type: options.endpoint.startsWith('/rpc') ? 'function' : 'relation',
// query part // query part
selects: options.selects || [],
selects: options.selects
} }


// private model cache & meta-info // private model cache & meta-info
@@ -105,7 +105,7 @@ export default (options={}) => {
// fill the data cache // fill the data cache
response.forEach((data, i) => { response.forEach((data, i) => {
// process values // process values
_configs.selects
_configs.selects && _configs.selects
.filter(select => select.processor) .filter(select => select.processor)
.forEach(select => data[select.alias || select.label] = select.processor(data[select.alias || select.label])) .forEach(select => data[select.alias || select.label] = select.processor(data[select.alias || select.label]))




불러오는 중...
취소
저장