diff options
Diffstat (limited to 'cobbler/commands.py')
-rw-r--r-- | cobbler/commands.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cobbler/commands.py b/cobbler/commands.py index 657934c..705249d 100644 --- a/cobbler/commands.py +++ b/cobbler/commands.py @@ -295,11 +295,12 @@ class CobblerFunction: else: rc = collect_fn().add(obj, save=True, with_sync=opt_sync, with_triggers=opt_triggers, check_for_duplicate_names=False, check_for_duplicate_netinfo=False) else: - # editing or copying (but not renaming), so duplicate netinfo - # CAN be bad, duplicate names are already handled, though - # we need to clean up checks around duplicate netinfo here - # (FIXME) so they are made and work. - rc = collect_fn().add(obj, save=True, with_sync=opt_sync, with_triggers=opt_triggers) + check_dup = False + if not "copy" in self.args: + check_dup = True + # FIXME: this ensures duplicate prevention on copy, but not + # rename? + rc = collect_fn().add(obj, save=True, with_sync=opt_sync, with_triggers=opt_triggers, check_for_duplicate_netinfo=check_dup) else: # we are renaming here, so duplicate netinfo checks also |