fix: association block report error for toOne association field (#2582)
This commit is contained in:
parent
797f566d70
commit
e7d60389b9
@ -345,6 +345,9 @@ export const useParamsFromRecord = () => {
|
||||
const filterByTk = useFilterByTk();
|
||||
const record = useRecord();
|
||||
const { fields } = useCollection();
|
||||
const fieldSchema = useFieldSchema();
|
||||
const { getCollectionJoinField } = useCollectionManager();
|
||||
const collectionField = getCollectionJoinField(fieldSchema?.['x-decorator-props']?.resource);
|
||||
const filterFields = fields
|
||||
.filter((v) => {
|
||||
return ['boolean', 'date', 'integer', 'radio', 'sort', 'string', 'time', 'uid', 'uuid'].includes(v.type);
|
||||
@ -360,7 +363,7 @@ export const useParamsFromRecord = () => {
|
||||
const obj = {
|
||||
filterByTk: filterByTk,
|
||||
};
|
||||
if (record.__collection) {
|
||||
if (record.__collection && !['oho', 'm2o', 'obo'].includes(collectionField?.interface)) {
|
||||
obj['targetCollection'] = record.__collection;
|
||||
}
|
||||
if (!filterByTk) {
|
||||
|
Loading…
Reference in New Issue
Block a user