fix: ensuring that only restorable versions are restorable
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 58s

This commit is contained in:
^
2024-04-30 11:14:47 +01:00
parent 5ab3f98855
commit a4028562ce
3 changed files with 22 additions and 23 deletions

View File

@@ -39,6 +39,18 @@
%let &outresult=NO;
%let &outreason=NOTFOUND;
/* check if there is actually a version to restore */
%local chk;
%let chk=0;
proc sql noprint;
select count(*) into: chk from &dc_libref..mpe_audit
where load_ref="&table";
%if &chk=0 %then %do;
%let allow_restore=NO;
%let reason=No entry for &table in MPE_AUDIT;
%return;
%end;
/* grab user groups */
%local user;
%let user=%mf_getuser();
@@ -117,20 +129,7 @@
%return;
%end;
%else %do;
/* check if there is actually a version to restore */
%local chk;
%let chk=0;
proc sql noprint;
select count(*) into: chk from &dc_libref..mpe_audit
where load_ref="&table";
%if &chk=0 %then %do;
%let allow_restore=NO;
%let reason=No entry for &table in MPE_AUDIT;
%end;
%else %do;
%let allow_restore=YES;
%let reason=CHECKS PASSED;
%end;
%return;
%let allow_restore=YES;
%let reason=CHECKS PASSED;
%end;
%mend mpe_checkrestore;