chore: "or" over "if not" pattern

Co-authored-by: Akhil Narang <me@akhilnarang.dev>
(cherry picked from commit e7e7ee0ec15d73c1e59cc34b93253ad21d619e0a)
This commit is contained in:
gavin 2024-10-29 12:44:46 +01:00 committed by Mergify
parent ae1c887b58
commit bdaa979159

View file

@ -24,9 +24,7 @@ class NavbarSettings(Document):
def get_app_logo():
app_logo = frappe.get_website_settings("app_logo")
if not app_logo:
app_logo = frappe.db.get_single_value("Navbar Settings", "app_logo", cache=True)
app_logo = frappe.get_website_settings("app_logo") or frappe.db.get_single_value("Navbar Settings", "app_logo", cache=True)
if not app_logo:
logos = frappe.get_hooks("app_logo_url")