Skip to content
Snippets Groups Projects
Commit cf7c3b75 authored by Nasreddin (bon)'s avatar Nasreddin (bon)
Browse files

[FIX] website_event_track: allow removing favicon


Issue

	- Install 'website_event_track' module
	- Go to settings and remove website favicon
	- Save

	Traceback is raised.

Cause

	Trying to create image from favicon for app_icon,
	but favicon not set anymore.

Solution

	If no website.favicon, set website.app_icon to False.

opw-2451934

closes odoo/odoo#67367

X-original-commit: dfe1a6af
Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 1b823742
Branches
Tags
No related merge requests found
......@@ -34,6 +34,9 @@ class Website(models.Model):
App Icon should be in PNG format and size of at least 512x512.
"""
for website in self:
if not website.favicon:
website.app_icon = False
continue
image = ImageProcess(website.favicon)
w, h = image.image.size
square_size = w if w > h else h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment