mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
Add running project check for fast duplication
Add is_running() check at the beginning of _fast_duplication() to prevent duplicating a project while nodes are running. Previously, only the export/import fallback path had this check, which meant running nodes were not detected when fast duplication succeeded. This aligns with the duplicate API behavior and provides a consistent safeguard against data inconsistencies.
This commit is contained in:
parent
45b5f8d7e2
commit
c4440d882d
@ -1404,6 +1404,10 @@ class Project:
|
||||
:param reset_mac_addresses: Reset MAC addresses for the duplicated project
|
||||
"""
|
||||
|
||||
# We don't duplicate a running project
|
||||
if self.is_running():
|
||||
raise ControllerError("Project must be stopped in order to duplicate it")
|
||||
|
||||
# remote replication is not supported with remote computes
|
||||
for compute in self.computes:
|
||||
if compute.id != "local":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user