Skip to content

Commit

Permalink
Merge pull request #3880 from camptocamp/fix_deep_recursion_detection
Browse files Browse the repository at this point in the history
Fix deep recursion detection in groups
  • Loading branch information
arnaud-morvan authored Sep 28, 2018
2 parents c41bc86 + 9fabf40 commit 29f7e85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions c2cgeoportal/views/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,12 +803,11 @@ def _group(

for tree_item in group.children:
if isinstance(tree_item, LayerGroup):
depth += 1
if isinstance(group, Theme) or catalogue or \
group.is_internal_wms == tree_item.is_internal_wms:
gp, gp_errors = self._group(
u"{0!s}/{1!s}".format(path, tree_item.name),
tree_item, layers, depth=depth, min_levels=min_levels,
tree_item, layers, depth=depth + 1, min_levels=min_levels,
catalogue=catalogue, role_id=role_id, version=version, mixed=mixed,
time=time, dim=dim, wms_layers=wms_layers, layers_name=layers_name, **kwargs
)
Expand Down

0 comments on commit 29f7e85

Please sign in to comment.