File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,16 @@ def run(self):
111111 # We need to check that the correct field is being used.
112112 if self .endpoint == NB_CONTACTS :
113113 if data .get ("groups" ):
114- if self .version < "4.3" :
114+ if not self ._version_check_greater (
115+ self .version , "4.3" , greater_or_equal = True
116+ ):
115117 raise Exception (
116118 f"contact_groups is not available in Netbox { self .version } . Use contact_group instead, or upgrade to Netbox 4.3 or greater."
117119 )
118120 if data .get ("group" ):
119- if self .version >= "4.3" :
121+ if self ._version_check_greater (
122+ self .version , "4.3" , greater_or_equal = True
123+ ):
120124 raise Exception (
121125 f"contact_group is not available in Netbox { self .version } . Use contact_groups instead."
122126 )
You can’t perform that action at this time.
0 commit comments