Skip to content

Commit

Permalink
Merge pull request #40 from cfengine/index_key
Browse files Browse the repository at this point in the history
Fixed issue in validate with new key name
  • Loading branch information
olehermanse committed Oct 26, 2021
2 parents de7e224 + 23723f7 commit 0084d21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cfbs/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __getitem__(self, key):
return self.get_modules()[key]

def _cache_path(self) -> str:
return cfbs_dir("index.json")
return cfbs_dir("cache.json")

def _get(self) -> dict:
path = self.path
Expand Down
4 changes: 2 additions & 2 deletions cfbs/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def validate_url_field(name, modules, field):
)

# Make sure index has a collection named modules
if not "modules" in index:
if not "index" in index:
raise CFBSIndexException(None, "Missing required attribute 'modules'")
modules = index["modules"]
modules = index["index"]

# Validate each entry in modules
for name in modules:
Expand Down

0 comments on commit 0084d21

Please sign in to comment.