Implement comparison between i32 and UserOrgType

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

No files matched your search

+1 -1
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