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

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

14
sas/package-lock.json generated
View File

@ -7,7 +7,7 @@
"name": "dc-sas",
"dependencies": {
"@sasjs/cli": "^4.11.1",
"@sasjs/core": "^4.51.3"
"@sasjs/core": "^4.51.4"
}
},
"node_modules/@coolaj86/urequest": {
@ -116,9 +116,9 @@
"integrity": "sha512-Grwydm5GxBsYk238PZw41XPjXVVQ9vWcvfZ06L2P0bQbvK0sGn7l69JA7H5MGr3QcaLpiD4Kg70cAh7PgE+JOw=="
},
"node_modules/@sasjs/core": {
"version": "4.51.3",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.3.tgz",
"integrity": "sha512-ATc6+Mk0oEN14Ih9jZYJAuNhU4wcXqDgD3oKGnCvW/jVVcMNRNuQlh6O2bBR9H31DnCW7W94MxhtPHud786+tg=="
"version": "4.51.4",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.4.tgz",
"integrity": "sha512-NHaSNZY2Jm2omnVNQlrMLiUtZsZq8JpnqxZPVKSPDfpTNnq6RHmwTXEZp7AJQ9YdDfEmibU5I+EDWstsoOi5Vg=="
},
"node_modules/@sasjs/lint": {
"version": "2.3.1",
@ -1834,9 +1834,9 @@
}
},
"@sasjs/core": {
"version": "4.51.3",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.3.tgz",
"integrity": "sha512-ATc6+Mk0oEN14Ih9jZYJAuNhU4wcXqDgD3oKGnCvW/jVVcMNRNuQlh6O2bBR9H31DnCW7W94MxhtPHud786+tg=="
"version": "4.51.4",
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.51.4.tgz",
"integrity": "sha512-NHaSNZY2Jm2omnVNQlrMLiUtZsZq8JpnqxZPVKSPDfpTNnq6RHmwTXEZp7AJQ9YdDfEmibU5I+EDWstsoOi5Vg=="
},
"@sasjs/lint": {
"version": "2.3.1",

View File

@ -29,6 +29,6 @@
"private": true,
"dependencies": {
"@sasjs/cli": "^4.11.1",
"@sasjs/core": "^4.51.3"
"@sasjs/core": "^4.51.4"
}
}

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;