Skip to content

Commit

Permalink
Merge pull request #224 from jhonabreul/bug-push-metadata-log-typo
Browse files Browse the repository at this point in the history
Fix typo in push metadata log message
  • Loading branch information
Martin-Molinero authored Nov 11, 2022
2 parents 793a32c + 5efbcd3 commit 9c96977
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lean/components/cloud/push_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,15 @@ def _push_metadata(self, project: Path, cloud_project: QCProject) -> None:

if update_args != {}:
self._api_client.projects.update(cloud_project.projectId, **update_args)
self._logger.info(f"Successfully updated {' and '.join(update_args.keys())} for '{cloud_project.name}'")

updated_keys = list(update_args)
if len(updated_keys) == 1:
updated_keys_str = updated_keys[0]
elif len(updated_keys) == 2:
updated_keys_str = " and ".join(updated_keys)
else:
updated_keys_str = ", ".join(updated_keys[:-1]) + f", and {updated_keys[-1]}"
self._logger.info(f"Successfully updated {updated_keys_str} for '{cloud_project.name}'")

def _get_cloud_project(self, project_id: int, organization_id: str) -> QCProject:
project = next(iter(p for p in self._cloud_projects if p.projectId == project_id), None)
Expand Down

0 comments on commit 9c96977

Please sign in to comment.