mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
fix: Update author retrieval to handle missing username gracefully in DownloadManager and utils
This commit is contained in:
@@ -352,7 +352,7 @@ class DownloadManager:
|
||||
base_model = version_info.get('baseModel', '')
|
||||
|
||||
# Get author from creator data
|
||||
author = version_info.get('creator', {}).get('username', 'Anonymous')
|
||||
author = version_info.get('creator', {}).get('username') or 'Anonymous'
|
||||
|
||||
# Apply mapping if available
|
||||
base_model_mappings = settings.get('base_model_path_mappings', {})
|
||||
|
||||
@@ -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', '')
|
||||
|
||||
Reference in New Issue
Block a user