fix: user follows panic
This commit is contained in:
parent
6af56ed2b2
commit
227cd3d2ac
2 changed files with 6 additions and 3 deletions
|
@ -379,7 +379,6 @@
|
||||||
("name" "tags")
|
("name" "tags")
|
||||||
("id" "tags")
|
("id" "tags")
|
||||||
("placeholder" "tags")
|
("placeholder" "tags")
|
||||||
("required" "")
|
|
||||||
("minlength" "2")
|
("minlength" "2")
|
||||||
("maxlength" "128")
|
("maxlength" "128")
|
||||||
(text "{% for tag in note.tags -%} {{ tag }}, {% endfor %}"))
|
(text "{% for tag in note.tags -%} {{ tag }}, {% endfor %}"))
|
||||||
|
|
|
@ -400,9 +400,13 @@ impl DataManager {
|
||||||
|
|
||||||
// decr counts (if we aren't deleting the user OR the user id isn't the deleted user id)
|
// decr counts (if we aren't deleting the user OR the user id isn't the deleted user id)
|
||||||
if !is_deleting_user | (follow.initiator != user.id) {
|
if !is_deleting_user | (follow.initiator != user.id) {
|
||||||
self.decr_user_following_count(follow.initiator)
|
if self
|
||||||
|
.decr_user_following_count(follow.initiator)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.is_err()
|
||||||
|
{
|
||||||
|
println!("ERR_TETRATTO_DECR_FOLLOWS: could not decr initiator follow count")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !is_deleting_user | (follow.receiver != user.id) {
|
if !is_deleting_user | (follow.receiver != user.id) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue