Skip to content

Commit

Permalink
revert content changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnb-devoted committed Dec 2, 2024
1 parent 18da8ff commit 881d184
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions spectacles/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,15 +565,13 @@ async def validate_content(
name=self.project,
filters=filters,
include_all_explores=True,
get_full_project=get_full_project,
)
explore_count = project.count_explores()
print_header(
f"Validating content based on {explore_count} "
f"{'explore' if explore_count == 1 else 'explores'}"
+ (" [incremental mode] " if incremental else "")
)

await validator.validate(project)
results = project.get_results(validator="content", filters=filters)

Expand Down
11 changes: 2 additions & 9 deletions spectacles/validators/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ def _get_tile_type(content: Dict[str, Any]) -> str:
)

def _get_errors_from_result(
self,
project: Project,
result: Dict[str, Any],
content_type: str,
self, project: Project, result: Dict[str, Any], content_type: str
) -> List[ContentError]:
content_errors: List[ContentError] = []
for error in result["errors"]:
Expand All @@ -148,11 +145,7 @@ def _get_errors_from_result(
else:
explore = None
# Skip errors that are not associated with selected explores or existing models
if not project.is_complete_project:
logger.debug(
f"Project is not complete -- showing errors for all models/explores"
)
if explore or model or not project.is_complete_project:
if explore or model:
content_id = result[content_type]["id"]
folder = result[content_type].get("folder")
folder_name: Optional[str] = folder.get("name") if folder else None
Expand Down

0 comments on commit 881d184

Please sign in to comment.