fixed problem with get_app when app does not exist

This commit is contained in:
mdipierro
2013-08-23 14:46:20 -05:00
parent 34cd24886e
commit 07aa9843f3
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.08.23.14.37.05
Version 2.6.0-development+timestamp.2013.08.23.14.45.37
+2 -1
View File
@@ -86,7 +86,8 @@ def safe_write(a, value, b='w'):
def get_app(name=None):
app = name or request.args(0)
if (app and os.path.exists(os.path.join(os.path.dirname(request.folder),app)) and
folder = request.folder if not request.folder.endswith('/') else request.folder[:-1]
if (app and os.path.exists(os.path.join(os.path.dirname(folder),app)) and
(not MULTI_USER_MODE or is_manager() or
db(db.app.name == app)(db.app.owner == auth.user.id).count())):
return app