Skip to content

Custom Fields are required  #14

@gohv

Description

@gohv

Hello!

In the settings.conf.example its stated that custom fields are not required unless

Custom fieldset values are not required unless mapping Kandji data to Snipe-IT custom fields

I am not mapping custom fields, we dont use any.
After configuring settings.conf and running kandji2snipe I get errors for custom fields:

First it was:

    if config['snipe-it']['mac_custom_fieldset_id'] != "":
       ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 1273, in __getitem__
    raise KeyError(key)

I added the field to settings.conf and now I am getting:

    for key in config['mac-api-mapping']:
               ~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/configparser.py", line 979, in __getitem__
    raise KeyError(key)

Am I missing some config in the script?

image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions