mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
fix(Odoo Node): Prevent possible issues with some custom fields (#3496)
This commit is contained in:
@@ -118,11 +118,16 @@ export class Odoo implements INodeType {
|
||||
const userID = await odooGetUserID.call(this, db, username, password, url);
|
||||
|
||||
const responce = await odooGetModelFields.call(this, db, userID, password, resource, url);
|
||||
|
||||
const options = Object.values(responce).map((field) => {
|
||||
const optionField = field as { [key: string]: string };
|
||||
let name = '';
|
||||
try {
|
||||
name = capitalCase(optionField.name);
|
||||
} catch (error) {
|
||||
name = optionField.name;
|
||||
}
|
||||
return {
|
||||
name: capitalCase(optionField.name),
|
||||
name,
|
||||
value: optionField.name,
|
||||
// nodelinter-ignore-next-line
|
||||
description: `name: ${optionField?.name}, type: ${optionField?.type} required: ${optionField?.required}`,
|
||||
|
||||
Reference in New Issue
Block a user