In Manga.new(), id_ may end up as None if the UNIQUE constraint on
(server_id, slug) is violated. Consequently, manga ends up being None,
and an AttributeError is raised by accessing manga.path.
This is typically the result of using the Explorer to browse a manga already
in the library, leading to an application crash.
Error: An unhandled exception occurs
Traceback (most recent call last):
File "/path/to/python/site-packages/komikku/explorer/search/__init__.py", line 462, in complete_get
manga = Manga.new(manga_data, self.server, Settings.get_default().long_strip_detection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/python/site-packages/komikku/models/database/mangas.py", line 116, in new
if not os.path.exists(manga.path):
AttributeError: 'NoneType' object has no attribute 'path'