Skip to content

Commit 0a0cf13

Browse files
committed
fix: only update access level in PNID.scrub when above 0
1 parent 7f33bf4 commit 0a0cf13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/models/pnid.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ PNIDSchema.method('scrub', async function scrub() {
298298

299299
this.deleted = true;
300300
this.marked_for_deletion = false;
301-
this.access_level = 0;
301+
if (this.access_level > 0) {
302+
this.access_level = 0;
303+
}
302304
this.server_access_level = 'prod';
303305
this.creation_date = '';
304306
this.birthdate = '';

0 commit comments

Comments
 (0)