Commit Graph

11 Commits

Author SHA1 Message Date
Christian Mäder
493fc60401 Use black as formatter for python files 2021-02-08 18:24:29 +01:00
Christian Mäder
e383fd42bd Fix custom fields initializer 2020-12-14 22:11:01 +01:00
Christian Mäder
349e269356 Remove the legacy select_field from the samples
This was only used for testing.
2020-12-14 20:58:50 +01:00
Christian Mäder
5c9bea8b50 Update Custom Field logic for Netbox v2.10.x 2020-12-14 20:58:43 +01:00
Christian Mäder
c001626b85 Update Custom Fields Initializer for Netbox 2.7
The custom field database model has changed in Netbox 2.7.
Therefore the initializer code, that was used before, broke.
As a user, you will need to update your custom_fields.yml file as
follows:

- type must be lowercase
  - the `selection` type was changed to `select`
- the filter_logic must be lower case

This is to achieve compatibility with the naming schema that
Netbox uses internally. It allows us to become forward compatible
in case Netbox ever introduces a new type for custom fields.

See the diff of this commit for further information how this is meant.
2020-01-20 08:39:26 +01:00
Aleksandar Radunovic
a120a95184 Fix initializers 2018-10-16 13:26:23 +02:00
thde
d851f28913 fix deprecated value 2018-06-28 09:28:07 +02:00
Demian
c85f658982
Merge branch 'master' into auto_weight_choices 2018-06-25 16:31:39 +02:00
Grokzen
187c349fde Add support for auto_weight counter on choices when loading selection field from custom_fields.yml
This also fixes a bug when using the same value for 2 different custom fields breaks becuase it tries to
create a new CustomFieldChoice object instead of reusing the one that already exists.
2018-05-18 21:17:21 +02:00
Grokzen
cdbfdaf361 Implement fix for field 'filterable' that was broken. Added new custom field parameter 'filter_logic' 2018-05-18 21:16:01 +02:00
Christian Mäder
43cb9f7e50
Include Initializers
Initializers are startup scripts for common tasks like creating custom
fields. These are problems many users of Netbox Docker potentially face
and are therefore worth sharing.
2018-02-16 10:25:51 +01:00