Implement comparison between i32 and UserOrgType

This commit is contained in:
Miroslav Prasil
2018-11-12 17:13:25 +00:00
parent b4e222d598
commit 66a4c5d48b
4 changed files with 112 additions and 32 deletions

View File

@@ -157,7 +157,7 @@ impl User {
pub fn delete(self, conn: &DbConn) -> QueryResult<()> {
for user_org in UserOrganization::find_by_user(&self.uuid, &*conn) {
if user_org.type_ == UserOrgType::Owner as i32 {
if user_org.type_ == UserOrgType::Owner {
if UserOrganization::find_by_org_and_type(
&user_org.org_uuid,
UserOrgType::Owner as i32, &conn