Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Fix checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Jun 13, 2024
1 parent 2492841 commit d88197f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions src/routes/v3/version_creation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,15 @@ async fn version_create_inner(

models::Project::clear_cache(project_id, None, Some(true), redis).await?;

if let Some(project) = models::Project::get_id(project_id, &*pool, &redis).await? {
if project.inner.status == ProjectStatus::Processing {
let project_status = sqlx::query!(
"SELECT status FROM mods WHERE id = $1",
project_id as models::ProjectId,
)
.fetch_optional(pool)
.await?;

if let Some(project_status) = project_status {
if project_status.status == ProjectStatus::Processing.as_str() {
moderation_queue.projects.insert(project_id.into());
}
}
Expand Down

0 comments on commit d88197f

Please sign in to comment.