mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-08 06:59:26 +08:00
fix: scope key error (#5314)
This commit is contained in:
parent
2bde4a3176
commit
e6d7d3a154
@ -460,10 +460,6 @@ export class Database extends EventEmitter implements AsyncEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options.underscored) {
|
if (options.underscored) {
|
||||||
if (lodash.get(options, 'sortable.scopeKey')) {
|
|
||||||
options.sortable.scopeKey = snakeCase(options.sortable.scopeKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lodash.get(options, 'indexes')) {
|
if (lodash.get(options, 'indexes')) {
|
||||||
// change index fields to snake case
|
// change index fields to snake case
|
||||||
options.indexes = options.indexes.map((index) => {
|
options.indexes = options.indexes.map((index) => {
|
||||||
|
@ -171,6 +171,7 @@ export class SortField extends Field {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const scopeKey = this.options.scopeKey;
|
const scopeKey = this.options.scopeKey;
|
||||||
|
|
||||||
if (scopeKey) {
|
if (scopeKey) {
|
||||||
const groups = await this.collection.repository.find({
|
const groups = await this.collection.repository.find({
|
||||||
attributes: [scopeKey],
|
attributes: [scopeKey],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user