This commit is contained in:
2026-06-13 19:54:11 +05:30
parent f2edf7ade7
commit dd7c2246df
3 changed files with 40 additions and 33 deletions

View File

@@ -17,6 +17,7 @@ export function getFieldOptions(field: ResourceField, relationData?: any[]): Sel
if (field.relation) {
const data = Array.isArray(relationData) ? relationData : [];
console.log('Getting options for relation', field.relation, 'data count:', data.length);
if (data.length === 0) {
throw new Error(`Relation data for "${field.relation}" is missing or empty cannot build options for field "${field.label}"`);
}