From 56d47d94f7205c14e2f1bc172e4e69b1dff12a0e Mon Sep 17 00:00:00 2001 From: BlackDex Date: Wed, 6 Dec 2023 21:56:46 +0100 Subject: [PATCH] Fix BWDC when re-run with cleared cache Using the BWDC with a cleared cache caused invited users to be converted to accepted users. The problem was a wrong check for the `restore` function. Fixes #4114 --- src/db/models/organization.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index 534dbce8..620d7428 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -214,7 +214,7 @@ impl UserOrganization { } pub fn restore(&mut self) -> bool { - if self.status < UserOrgStatus::Accepted as i32 { + if self.status < UserOrgStatus::Invited as i32 { self.status += ACTIVATE_REVOKE_DIFF; return true; }