diff --git a/core/dbt/parser/manifest.py b/core/dbt/parser/manifest.py index 416062e1e14..3bbc3cc6f33 100644 --- a/core/dbt/parser/manifest.py +++ b/core/dbt/parser/manifest.py @@ -661,8 +661,8 @@ def check_for_spaces_in_model_names(self): level=level, ) - if level == EventLevel.ERROR and improper_model_names != 0: - raise DbtValidationError("Model names cannot contain spaces") + if level == EventLevel.ERROR: + raise DbtValidationError("Model names cannot contain spaces") def load_and_parse_macros(self, project_parser_files): for project in self.all_projects.values():