Skip to content

Commit

Permalink
fix(core): fix project creator path in old project schema (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius committed Dec 7, 2021
1 parent 353958b commit d6cafa3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions renku/core/management/migrations/models/v9.py
Expand Up @@ -164,9 +164,10 @@ def _now(self):
def __attrs_post_init__(self):
"""Initialize computed attributes."""
if not self.creator and self.client:
if self.client.database_path.exists():
old_metadata_path = self.client.renku_path.joinpath(OLD_METADATA_PATH)
if old_metadata_path.exists():
self.creator = Person.from_commit(
self.client.repository.get_previous_commit(self.client.database_path, first=True)
self.client.repository.get_previous_commit(old_metadata_path, first=True)
)
else:
# this assumes the project is being newly created
Expand Down

0 comments on commit d6cafa3

Please sign in to comment.