Bugfix: depth query parameter

parent c1288558
......@@ -485,7 +485,13 @@ class BaseDatastore:
n = nrpc.prune_data_tree(n, root, ii, Permission.NACM_ACCESS_READ)
try:
max_depth = int(rpc.qs["depth"][0])
max_depth_str = rpc.qs["depth"][0]
if max_depth_str == "unbounded":
max_depth = None
else:
max_depth = int(max_depth_str) - 1
if (max_depth < 0) or (max_depth > 65535):
raise ValueError()
except (IndexError, KeyError):
max_depth = None
except ValueError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment