diff options
Diffstat (limited to 'g4f/gui/server/api.py')
-rw-r--r-- | g4f/gui/server/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/gui/server/api.py b/g4f/gui/server/api.py index 747d0c21..29566595 100644 --- a/g4f/gui/server/api.py +++ b/g4f/gui/server/api.py @@ -136,7 +136,7 @@ class Api(): camera.take_picture(filename=filename, on_complete=self.on_camera) def on_image_selection(self, filename): - filename = filename[0] if isinstance(filename, list) else filename + filename = filename[0] if isinstance(filename, list) and filename else filename if filename is not None and os.path.exists(filename): self.image = filename else: |