Skip to content

Commit 2739ae8

Browse files
committed
code review comments
1 parent 76ddfcc commit 2739ae8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

backend/actions/Model/listModels.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ module.exports = ({ db }) => async function listModels(params) {
4646
}
4747
}
4848
}
49+
removeSpecifiedPaths(schemaPaths, '.$*');
4950
}
5051

5152
return {
52-
models: Object.keys(db.models).filter(key => !key.startsWith('__Studio_')).sort(),
53+
models,
5354
modelSchemaPaths,
5455
readyState
5556
};

frontend/src/dashboard-result/dashboard-document/dashboard-document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = app => app.component('dashboard-document', {
1010
inject: ['state'],
1111
computed: {
1212
references() {
13-
const model = this.value.$document.model || 'User';
13+
const model = this.value.$document?.model;
1414
if (typeof model === 'string' && this.state.modelSchemaPaths?.[model]) {
1515
const map = {};
1616
for (const path of Object.keys(this.state.modelSchemaPaths[model])) {

0 commit comments

Comments
 (0)