aboutsummaryrefslogtreecommitdiff
path: root/src/db/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/models')
-rw-r--r--src/db/models/attachment.rs2
-rw-r--r--src/db/models/collection.rs2
-rw-r--r--src/db/models/org_policy.rs2
-rw-r--r--src/db/models/two_factor.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/db/models/attachment.rs b/src/db/models/attachment.rs
index 83f4889c..65855cc0 100644
--- a/src/db/models/attachment.rs
+++ b/src/db/models/attachment.rs
@@ -95,7 +95,7 @@ impl Attachment {
pub async fn delete(&self, conn: &mut DbConn) -> EmptyResult {
db_run! { conn: {
- crate::util::retry(
+ let _: () = crate::util::retry(
|| diesel::delete(attachments::table.filter(attachments::id.eq(&self.id))).execute(conn),
10,
)
diff --git a/src/db/models/collection.rs b/src/db/models/collection.rs
index b10dd1d6..0d439757 100644
--- a/src/db/models/collection.rs
+++ b/src/db/models/collection.rs
@@ -632,7 +632,7 @@ impl CollectionUser {
db_run! { conn: {
for user in collectionusers {
- diesel::delete(users_collections::table.filter(
+ let _: () = diesel::delete(users_collections::table.filter(
users_collections::user_uuid.eq(user_uuid)
.and(users_collections::collection_uuid.eq(user.collection_uuid))
))
diff --git a/src/db/models/org_policy.rs b/src/db/models/org_policy.rs
index 6f6f894e..d1e8aa0f 100644
--- a/src/db/models/org_policy.rs
+++ b/src/db/models/org_policy.rs
@@ -115,7 +115,7 @@ impl OrgPolicy {
// We need to make sure we're not going to violate the unique constraint on org_uuid and atype.
// This happens automatically on other DBMS backends due to replace_into(). PostgreSQL does
// not support multiple constraints on ON CONFLICT clauses.
- diesel::delete(
+ let _: () = diesel::delete(
org_policies::table
.filter(org_policies::org_uuid.eq(&self.org_uuid))
.filter(org_policies::atype.eq(&self.atype)),
diff --git a/src/db/models/two_factor.rs b/src/db/models/two_factor.rs
index 2120a0e2..9155c518 100644
--- a/src/db/models/two_factor.rs
+++ b/src/db/models/two_factor.rs
@@ -95,7 +95,7 @@ impl TwoFactor {
// We need to make sure we're not going to violate the unique constraint on user_uuid and atype.
// This happens automatically on other DBMS backends due to replace_into(). PostgreSQL does
// not support multiple constraints on ON CONFLICT clauses.
- diesel::delete(twofactor::table.filter(twofactor::user_uuid.eq(&self.user_uuid)).filter(twofactor::atype.eq(&self.atype)))
+ let _: () = diesel::delete(twofactor::table.filter(twofactor::user_uuid.eq(&self.user_uuid)).filter(twofactor::atype.eq(&self.atype)))
.execute(conn)
.map_res("Error deleting twofactor for insert")?;