From 6f72641459ce35d298e864a40a1b8f4c4e58cc8e Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 15 Mar 2015 14:41:09 -0500 Subject: [PATCH] fixed problem with URL('') --- gluon/html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gluon/html.py b/gluon/html.py index d9c47887..6c6a047c 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -275,9 +275,9 @@ def URL( args = [args] if r is None: - if a and not c and not f: + if a is not None and c is None and f is None: (f, a, c) = (a, c, f) - elif a and c and not f: + elif a is not None and c is not None and f is None: (c, f, a) = (a, c, f) from globals import current if hasattr(current, 'request'): @@ -326,7 +326,7 @@ def URL( function2 = '%s.%s' % (function, extension or 'html') - if not (application and controller and function): + if not (application and controller and function is not None): raise SyntaxError('not enough information to build the url (%s %s %s)' % (application, controller, function)) if args: