Skip to content

Commit 3a40e83

Browse files
authored
fix: set missing creator when migrating projects (#2464)
1 parent 2812659 commit 3a40e83

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

renku/core/management/migrations/m_0009__new_metadata_storage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def maybe_migrate_project_to_database(client, project_gateway: IProjectGateway):
102102
metadata_path = client.renku_path.joinpath(OLD_METADATA_PATH)
103103

104104
if metadata_path.exists():
105-
old_project = old_schema.Project.from_yaml(metadata_path)
105+
old_project = old_schema.Project.from_yaml(metadata_path, client=client)
106106

107107
id_path = urlparse(old_project._id).path
108108
id_path = id_path.replace("/projects/", "")

renku/core/management/migrations/models/v9.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def __attrs_post_init__(self):
262262
self._project = self.client.project
263263
except ValueError:
264264
metadata_path = self.client.renku_path.joinpath(OLD_METADATA_PATH)
265-
self._project = Project.from_yaml(metadata_path)
265+
self._project = Project.from_yaml(metadata_path, client=self.client)
266266

267267
if not self._id:
268268
self._id = self.default_id()

renku/core/management/migrations/utils/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def generate_dataset_file_url(client, filepath):
116116
from renku.core.management.migrations.models.v9 import Project
117117

118118
metadata_path = client.renku_path.joinpath(OLD_METADATA_PATH)
119-
project = Project.from_yaml(metadata_path)
119+
project = Project.from_yaml(metadata_path, client=client)
120120

121121
project_id = urlparse(project._id)
122122
else:

0 commit comments

Comments
 (0)