From da8cb8bdf1c2408587fb81e4f76eb542fa877630 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Sat, 6 Apr 2024 12:03:32 +0200 Subject: Update api.py --- g4f/gui/server/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f/gui/server') diff --git a/g4f/gui/server/api.py b/g4f/gui/server/api.py index 29566595..ab9ad331 100644 --- a/g4f/gui/server/api.py +++ b/g4f/gui/server/api.py @@ -137,7 +137,7 @@ class Api(): def on_image_selection(self, filename): filename = filename[0] if isinstance(filename, list) and filename else filename - if filename is not None and os.path.exists(filename): + if filename and os.path.exists(filename): self.image = filename else: self.image = None -- cgit v1.2.3