From 97f99c66d970a5284cd9ced1dc03745ec35850f5 Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Tue, 1 Jun 2021 15:10:44 +0200 Subject: [bas-python] Make name field optional instead of null --- modules.d/bas-python/scripts/collect_hw_info_json.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules.d/bas-python/scripts/collect_hw_info_json.py b/modules.d/bas-python/scripts/collect_hw_info_json.py index 6070fa85..23159853 100755 --- a/modules.d/bas-python/scripts/collect_hw_info_json.py +++ b/modules.d/bas-python/scripts/collect_hw_info_json.py @@ -238,7 +238,9 @@ def main(): _collecthw['net'] = get_net_fallback() _collecthw['location'] = prepare_location(args.location, args.rack, args.bay, args.slot) _collecthw['contacts'] = prepare_contacts(args.contact) - _collecthw['name'] = args.name + + if args.name: + _collecthw['name'] = args.name collecthw_json = json.dumps(_collecthw) if args.url: -- cgit v1.2.3-55-g7522