"...models/git@developer.sourcefind.cn:Wenxuan/LightX2V.git" did not exist on "6f9bbff6aca183c3057d7a8828e34778434488bc"
Unverified Commit 4331923b authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix None value when adding info to auto_map (#22990)

parent d0b50023
......@@ -560,8 +560,8 @@ def add_model_info_to_auto_map(auto_map, repo_id):
"""
for key, value in auto_map.items():
if isinstance(value, (tuple, list)):
auto_map[key] = [f"{repo_id}--{v}" if "--" not in v else v for v in value]
else:
auto_map[key] = f"{repo_id}--{value}" if "--" not in value else value
auto_map[key] = [f"{repo_id}--{v}" if (v is not None and "--" not in v) else v for v in value]
elif value is not None and "--" not in value:
auto_map[key] = f"{repo_id}--{value}"
return auto_map
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment