fix: Update author retrieval to handle missing username gracefully in DownloadManager and utils

This commit is contained in:
Will Miao
2025-08-16 16:11:56 +08:00
parent dcb9983786
commit 1624a45093
2 changed files with 2 additions and 2 deletions

View File

@@ -156,7 +156,7 @@ def calculate_relative_path_for_model(model_data: Dict, model_type: str = 'lora'
if civitai_data and civitai_data.get('id') is not None:
base_model = civitai_data.get('baseModel', '')
# Get author from civitai creator data
author = civitai_data.get('creator', {}).get('username', 'Anonymous')
author = civitai_data.get('creator', {}).get('username') or 'Anonymous'
else:
# Fallback to model_data fields for non-CivitAI models
base_model = model_data.get('base_model', '')