Skip to content

fix: updated logo and favicon handling to correctly set paths in branding configuration #721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions preswald/engine/managers/branding.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def _handle_logo(
else:
logo_path = os.path.join(script_dir, logo)
logger.info(f"Looking for logo at: {logo_path}")
if not os.path.exists(logo_path):
if os.path.exists(logo_path):
branding["logo"] = logo_path # Updating logo_path in branding dict
else:
self._copy_default_logo()
logger.info("Using default logo")

Expand All @@ -133,7 +135,9 @@ def _handle_favicon(
else:
favicon_path = os.path.join(script_dir, favicon)
logger.info(f"Looking for favicon at: {favicon_path}")
if not os.path.exists(favicon_path):
if os.path.exists(favicon_path):
branding["favicon"] = favicon_path # Updating favicon_path in branding dict
else:
self._copy_default_favicon()
logger.info("Using default favicon")

Expand Down