From 71e30cc6c9a84901c04b22df990216ea1a975d5d Mon Sep 17 00:00:00 2001
From: Dario Barghini <dario.barghini@inaf.it>
Date: Wed, 20 Nov 2024 22:17:30 +0100
Subject: [PATCH] Fix bug on report_year after return codes refactoring

---
 code/calibration/report_year.pro | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/code/calibration/report_year.pro b/code/calibration/report_year.pro
index c539a2e..6238a20 100644
--- a/code/calibration/report_year.pro
+++ b/code/calibration/report_year.pro
@@ -9,10 +9,6 @@ compile_opt idl2
 
 message, camera + '_' + target + ' - start exporting calibration report.', /informational
 
-; reading camera parameters structure from last analyzed month
-par = get_par(config, camera, ff[-1], /return0)
-if par.file eq '' then return
-
 ; going into the calibration results directory
 ckcd, config.path.dir_calibrations, current = old_dir, check = check
 if ~check then return
@@ -23,11 +19,15 @@ if ~check then return
 ff = myfile_search(target)
 
 if ff[0] eq '' then begin
-  
+
   cd, old_dir
   return
-  
-endif 
+
+endif
+
+; reading camera parameters structure from last analyzed month
+par = get_par(config, camera, ff[-1], /return0)
+if par.file eq '' then return
 
 ; checking for keyword input
 if isa(report_calib) then par.config.calibration.report_calib = report_calib
-- 
GitLab