Closed ylmrx closed 3 years ago
@ylmrx I just came here to make this exact PR
@ylmrx - Thank you. Did you back-test this change against the Netbox 2.8 release? I don't recall this third arg was present then. Please confirm and we can go from there. Thank you.
This change will probably break the plugin for NetBox < 2.10. I'm not sure how to proceed to keep the plugin compatible with this breaking change. Maybe by using *args
as function parameter?
def validate(cls, user_config, *args):
if len(args) == 1:
super().validate(user_config, args[0])
else:
super().validate(user_config)
This change will probably break the plugin for NetBox < 2.10. I'm not sure how to proceed to keep the plugin compatible with this breaking change. Maybe by using
*args
as function parameter?def validate(cls, user_config, *args): if len(args) == 1: super().validate(user_config, args[0]) else: super().validate(user_config)
Yes, that would be AOK. Please make that change and I will merge. Really appreciate your contribution!
@ylmrx - thank you! I will roll a release and upload to PyPi tomorrow.
cf. https://github.com/netbox-community/netbox/commit/13a13f3943c933fc43be0e135a6dc78f460fba0f
Also the version number in init was off. :)