File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1101,11 +1101,20 @@ def get_version(self, version_id: str) -> VersionInfo:
11011101 `Version`.
11021102 """
11031103 try :
1104- return VersionInfo .model_validate (
1105- self .client .get (
1106- f"/dandisets/{ self .identifier } /versions/{ version_id } /info/"
1107- )
1104+ info_resp = self .client .get (
1105+ f"/dandisets/{ self .identifier } /versions/{ version_id } /info/"
11081106 )
1107+
1108+ # Handle validation error changes https://github.com/dandi/dandi-archive/pull/2719
1109+ if "asset_validation_errors" not in info_resp :
1110+ info_resp ["asset_validation_errors" ] = self .client .get (
1111+ f"/dandisets/{ self .identifier } /versions/{ version_id } /asset_validation_errors/"
1112+ )
1113+ info_resp ["version_validation_errors" ] = info_resp .pop (
1114+ "validation_errors"
1115+ )
1116+
1117+ return VersionInfo .model_validate (info_resp )
11091118 except HTTP404Error :
11101119 raise NotFoundError (
11111120 f"No such version: { version_id !r} of Dandiset { self .identifier } "
You can’t perform that action at this time.
0 commit comments