Skip to content

Commit

Permalink
fix(client): fix not checkout when giving revision in create branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rexzheng324-c committed Jun 3, 2021
1 parent 81b77a7 commit 5652e4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tensorbay/client/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ def create_branch(self, name: str, revision: Optional[str] = None) -> None:
"""
if not revision:
self._status.check_authority_for_commit()
revision = self._status.commit_id
else:
self.checkout(revision=revision)
revision = self._status.commit_id

post_data: Dict[str, Any] = {"name": name, "commit": revision}
self._client.open_api_do("POST", "branches", self.dataset_id, json=post_data)
Expand Down

0 comments on commit 5652e4a

Please sign in to comment.