Fix TM pending in project route (#584)

This commit is contained in:
Geometrically
2023-04-22 17:44:51 -07:00
committed by GitHub
parent 72cfa683cf
commit 339ac05443
2 changed files with 10 additions and 4 deletions

View File

@@ -1053,7 +1053,7 @@ pub async fn project_edit(
if let Some(moderation_message) = &new_project.moderation_message {
if !user.role.is_mod()
&& (!project_item.inner.status.is_approved() || moderation_message != &None)
&& (!project_item.inner.status.is_approved() || moderation_message.is_some())
{
return Err(ApiError::CustomAuthentication(
"You do not have the permissions to edit the moderation message of this project!"
@@ -1077,7 +1077,7 @@ pub async fn project_edit(
if let Some(moderation_message_body) = &new_project.moderation_message_body {
if !user.role.is_mod()
&& (!project_item.inner.status.is_approved()
|| moderation_message_body != &None)
|| moderation_message_body.is_some())
{
return Err(ApiError::CustomAuthentication(
"You do not have the permissions to edit the moderation message body of this project!"