From de0759c26a9e857e2b8d7244673625fc79ee4660 Mon Sep 17 00:00:00 2001 From: sct Date: Thu, 10 Jun 2021 18:28:33 +0900 Subject: [PATCH] fix(requests): do not prevent duplicate requests if other requests are declined --- server/routes/request.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/routes/request.ts b/server/routes/request.ts index cd6ef8f7f..0819bdfa8 100644 --- a/server/routes/request.ts +++ b/server/routes/request.ts @@ -256,6 +256,9 @@ requestRoutes.post('/', async (req, res, next) => { .leftJoin('request.media', 'media') .where('request.is4k = :is4k', { is4k: req.body.is4k }) .andWhere('media.tmdbId = :tmdbId', { tmdbId: tmdbMedia.id }) + .andWhere('request.status != :requestStatus', { + requestStatus: MediaRequestStatus.DECLINED, + }) .getOne(); if (existing) {