commit f1161c65fb67c2f54a7c20b0f7aafdc2f9cd0af1
parent 50eeb4f651b3e320d647bd6830097765ba3788eb
Author: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Date: Tue, 8 Jan 2019 14:05:05 +0100
Make sure an invitation is created when reinviting
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs
@@ -545,8 +545,9 @@ fn reinvite_user(org_id: String, user_org: String, headers: AdminHeaders, conn:
Some(user) => user,
None => err!("User not found."),
};
-
- Invitation::take(&user.email, &conn);
+
+ let mut invitation = Invitation::new(user.email.clone());
+ invitation.save(&conn)?;
let org_name = match Organization::find_by_uuid(&org_id, &conn) {
Some(org) => org.name,