Skip to content

Commit

Permalink
[#2618] Auto sort ordering when dependencies on group
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 20, 2012
1 parent b006a85 commit 7ecf0d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/lib/fanstatic_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ def create_resource(path, lib_name, count, inline=False):
for group in groups:
for resource in groups[group]:
if resource not in order:
# make sure any dependencies are met when we get to creating
# the resource
if resource in depends:
for dep in depends[resource]:
if dep not in order:
order.append(dep)
order.append(resource)

for x in reversed(order):
Expand Down

0 comments on commit 7ecf0d2

Please sign in to comment.