From c94b70c2c4b9cf3b509dbc749ea0787d2767e05e Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Thu, 11 Apr 2024 20:04:20 -0700 Subject: [PATCH] Reduce duplicate `if` logic in `check_for_spaces_in_model_names` --- core/dbt/parser/manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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():