does this work if we don't pass in rev, but if we pass in other url get parameters?

I would like to see:
if keyrevision != "":
    return { 'alerts': run_query("where keyrevision='%s'" % keyrevision, True) }