diff --git a/src/macaron/repo_finder/commit_finder.py b/src/macaron/repo_finder/commit_finder.py index c2f0c7e04..be75c92b8 100644 --- a/src/macaron/repo_finder/commit_finder.py +++ b/src/macaron/repo_finder/commit_finder.py @@ -213,7 +213,7 @@ def extract_commit_from_version(git_obj: Git, version: str) -> str | None: if not commit: return None - return str(commit.hash) + return commit.hash if commit else None def find_commit_from_version_and_name(git_obj: Git, name: str, version: str) -> str | None: