fix: ensuring that only restorable versions are restorable
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 58s
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 58s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user