Skip to content

Inventree parameter not created if Part Category Parameter Template exists for parameter #268

@ursincantieni

Description

@ursincantieni

Running on Ki-nTree version 1.1.4.

I'm creating Inventree parts from digikey search with the following supplier_parameters.yaml

Capacitor:
  Tolerance:
  - Tolerance
  Value:
  - Capacitance
  Voltage:
  - Voltage - Rated
  - Voltage Rated

The issue I'm seeing is that upon creating a part some parameters are skipped, i.e. Tolerance and Voltage, while others work as intended, i.e. Value. While I have set up Part Category Parameter Templates for Tolerance and Voltage in Inventree Admin tool I removed it for Value.

[MAIN]	Creating parameters
[INFO]	Success: The following parameters were created:
--->	Value
[TREE]	Warning: The following parameters were skipped:
--->	Tolerance
--->	Voltage

After removing the Parameter template for Voltage as well, the parameter will be created and populated correctly.

[MAIN]	Creating parameters
[INFO]	Success: The following parameters were created:
--->	Value
--->	Voltage
[TREE]	Warning: The following parameters were skipped:
--->	Tolerance

It appears that the parameters are skipped if they are already created as an effect of the template. This is not an issue by itself, as they do not need to be created (again) because they already exist (due to the template). The issue, however, is that for the skipped parameters the value will not be populated and left empty.

A workaround is to update the create part after creation by checking the Update existing box in invenTree page. The fact that this work also tells me that the linking of the parameters generally is setup correctly. However, this is an unnecessary manual step that requires me to copy paste the IPN from InvenTree back into Ki-nTree and run the update.

[MAIN]	Creating parameters
[INFO]	Success: The following parameters were updated:
--->	Tolerance
[TREE]	Warning: The following parameters were skipped:
--->	Value
--->	Voltage

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions