mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 05:04:05 -08:00
fix(Odoo Node): Prevent possible issues with some custom fields (#3496)
This commit is contained in:
parent
224e008fb6
commit
7d968ec202
|
@ -118,11 +118,16 @@ export class Odoo implements INodeType {
|
||||||
const userID = await odooGetUserID.call(this, db, username, password, url);
|
const userID = await odooGetUserID.call(this, db, username, password, url);
|
||||||
|
|
||||||
const responce = await odooGetModelFields.call(this, db, userID, password, resource, url);
|
const responce = await odooGetModelFields.call(this, db, userID, password, resource, url);
|
||||||
|
|
||||||
const options = Object.values(responce).map((field) => {
|
const options = Object.values(responce).map((field) => {
|
||||||
const optionField = field as { [key: string]: string };
|
const optionField = field as { [key: string]: string };
|
||||||
|
let name = '';
|
||||||
|
try {
|
||||||
|
name = capitalCase(optionField.name);
|
||||||
|
} catch (error) {
|
||||||
|
name = optionField.name;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
name: capitalCase(optionField.name),
|
name,
|
||||||
value: optionField.name,
|
value: optionField.name,
|
||||||
// nodelinter-ignore-next-line
|
// nodelinter-ignore-next-line
|
||||||
description: `name: ${optionField?.name}, type: ${optionField?.type} required: ${optionField?.required}`,
|
description: `name: ${optionField?.name}, type: ${optionField?.type} required: ${optionField?.required}`,
|
||||||
|
|
Loading…
Reference in a new issue