mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
fix: logic error in initial data check
This commit is contained in:
@@ -36,7 +36,7 @@ pub async fn edit_role_ranks(
|
||||
|
||||
// Verify all roles are in the new ordering
|
||||
if data.ranks.len() != server.roles.len()
|
||||
&& server.roles.iter().all(|(id, _)| data.ranks.contains(id))
|
||||
|| !server.roles.iter().all(|(id, _)| data.ranks.contains(id))
|
||||
{
|
||||
return Err(create_error!(InvalidOperation));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user