mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
fix: npe when installed_app.app not found
This commit is contained in:
parent
6ec916a2f3
commit
e9a4df5327
@ -27,7 +27,13 @@ def installed_app_required(view=None):
|
||||
).first()
|
||||
|
||||
if installed_app is None:
|
||||
NotFound('Installed app not found')
|
||||
raise NotFound('Installed app not found')
|
||||
|
||||
if not installed_app.app:
|
||||
db.session.delete(installed_app)
|
||||
db.session.commit()
|
||||
|
||||
raise NotFound('Installed app not found')
|
||||
|
||||
return view(installed_app, *args, **kwargs)
|
||||
return decorated
|
||||
|
||||
Loading…
Reference in New Issue
Block a user