mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -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 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}`,
|
||||
|
|
Loading…
Reference in a new issue