diff --git a/gns3server/controller/export_project.py b/gns3server/controller/export_project.py index 25c167e2..1cc93a12 100644 --- a/gns3server/controller/export_project.py +++ b/gns3server/controller/export_project.py @@ -47,6 +47,9 @@ def export_project(project, temporary_dir, include_images=False, keep_compute_id if project.is_running(): raise aiohttp.web.HTTPConflict(text="Running topology could not be exported") + # Make sure we save the project + project.dump() + z = zipstream.ZipFile(allowZip64=True) if not os.path.exists(project._path): diff --git a/tests/controller/test_export_project.py b/tests/controller/test_export_project.py index 2b6b6610..f48df7c8 100644 --- a/tests/controller/test_export_project.py +++ b/tests/controller/test_export_project.py @@ -33,7 +33,9 @@ from gns3server.controller.export_project import export_project, _filter_files @pytest.fixture def project(controller): - return Project(controller=controller, name="Test") + p = Project(controller=controller, name="Test") + p.dump = MagicMock() + return p @pytest.fixture