Skip to content

Commit

Permalink
Avoid dynamic validation when no files are exported (#1773)
Browse files Browse the repository at this point in the history
  • Loading branch information
M5Skid authored Feb 3, 2023
1 parent 30fc432 commit f172949
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions _delphi_utils_python/delphi_utils/validator/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ def validate(self):
frames_list = load_all_files(self.export_dir, self.time_window.start_date,
self.time_window.end_date)
self.static_validation.validate(frames_list, report)
# Check if frames_list is empty before calling aggregate_frames
if len(frames_list) == 0:
all_frames = []
else:
all_frames = aggregate_frames(frames_list)
self.dynamic_validation.validate(all_frames, report)
# Dynamic Validation only performed when frames_list is populated
if len(frames_list) > 0:
self.dynamic_validation.validate(aggregate_frames(frames_list), report)
return report

0 comments on commit f172949

Please sign in to comment.