fixed issue 711, crud.upadate(...,next=URL(...)), thanks iceberg

This commit is contained in:
Massimo Di Pierro
2012-03-19 16:04:19 -05:00
parent 54df20f543
commit 84de17dc6b
2 changed files with 6 additions and 4 deletions

View File

@@ -1 +1 @@
Version 1.99.7 (2012-03-19 15:55:45) dev
Version 1.99.7 (2012-03-19 16:04:11) dev

View File

@@ -73,9 +73,11 @@ def call_or_redirect(f,*args):
redirect(f)
def replace_id(url, form):
if url and not url[0] == '/' and url[:4] != 'http':
return URL(url.replace('[id]', str(form.vars.id)))
return url
if url:
url = url.replace('[id]', str(form.vars.id))
if url[0] == '/' or url[:4] == 'http':
return url
return URL(url)
class Mail(object):
"""