Skip to content

Commit

Permalink
[depends] section if resource.config
Browse files Browse the repository at this point in the history
Now groups in resource.config['depends'] can
define another groups from the same file as
their dependencies
  • Loading branch information
smotornyuk committed Jan 18, 2017
1 parent 07ce1ec commit f458954
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ckan/lib/fanstatic_resources.py
Expand Up @@ -157,8 +157,12 @@ def create_resource(path, lib_name, count, inline=False):
if resource not in depends:
depends[resource] = []
for dep in depends[group]:
if dep not in depends[resource]:
depends[resource].append(dep)
if dep not in groups:
dep_resources = [dep]
else:
dep_resources = groups[dep]
diff = set(dep_resources).difference(depends[resource])
depends[resource].extend(diff)

# process each .js/.css file found
resource_list = []
Expand Down

0 comments on commit f458954

Please sign in to comment.