File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -319,16 +319,18 @@ def tag_all_the_things(self, netbox_handler):
319
319
else :
320
320
321
321
if bool (set (this_object_tags ).intersection (disabled_sources_tags )) is True :
322
- log .debug2 (f"Object '{ this_object .get_display_name ()} ' was added "
322
+ log .debug2 (f"Object { this_object . __class__ . name } '{ this_object .get_display_name ()} ' was added "
323
323
f"from a currently disabled source. Skipping orphaned tagging." )
324
324
continue
325
325
326
326
# test for different conditions.
327
327
if netbox_handler .primary_tag not in this_object_tags :
328
328
continue
329
329
330
- if bool (set (this_object_tags ).intersection (all_sources_tags )) is False \
331
- and netbox_handler .ignore_unknown_source_object_pruning is True :
330
+ if bool (set (this_object_tags ).intersection (all_sources_tags )) is True :
331
+ for source_tag in all_sources_tags :
332
+ this_object .remove_tags (source_tag )
333
+ elif netbox_handler .settings .ignore_unknown_source_object_pruning is True :
332
334
continue
333
335
334
336
if getattr (this_object , "prune" , False ) is False :
You can’t perform that action at this time.
0 commit comments