nautobot / pynautobot

Nautobot Python SDK
https://pynautobot.readthedocs.io/en/latest/index.html
Apache License 2.0
36 stars 32 forks source link

custom field endpoint #141

Closed gygetho closed 10 months ago

gygetho commented 10 months ago

Since the method custom_fields() was introduced in app.py, you're not able to get the custom_fields endpoint anymore because api.extras.custom_fields pointing to the method custom_fields() of app.py. in Version 1.5 the following code was working:

nautobot = api(url=na_url, token=token) cf_model = nautobot.extras.custom_fields cf_model.create(data)

on newer versions, the workaround looks like this: nautobot = api(url=na_url, token=token) cf_model = nautobot.extras.getattr("custom_fields") cf_model.create(data)

the same applies to "custom_field_choises"

pszulczewski commented 10 months ago

@gygetho many thanks for reporting that issue. We missed that overlap in the PR from the community to tidy up naming. Fix on its way.

gygetho commented 10 months ago

@pszulczewski Patryk, thanks a lot! You guys doing a great job! I appreciate your work!