mirror of
https://github.com/modelscope/modelscope.git
synced 2026-09-03 04:32:02 +02:00
Fix invalid revision in repo_info (#1496)
This commit is contained in:
@@ -318,6 +318,13 @@ class CommitHistoryResponse:
|
||||
def from_api_response(cls, data: dict) -> 'CommitHistoryResponse':
|
||||
"""Create CommitHistoryResponse from API response data."""
|
||||
commits_data = data.get('Data', {}).get('Commit', [])
|
||||
|
||||
if not commits_data:
|
||||
return cls(
|
||||
commits=[],
|
||||
total_count=0,
|
||||
)
|
||||
|
||||
commits = [
|
||||
DetailedCommitInfo.from_api_response(commit)
|
||||
for commit in commits_data
|
||||
|
||||
Reference in New Issue
Block a user