fix: collapse nested if in wrapup generate
Some checks failed
CI / Check / Test (push) Failing after 44s
Some checks failed
CI / Check / Test (push) Failing after 44s
This commit is contained in:
@@ -13,10 +13,10 @@ pub async fn execute(ctx: &AppContext, cmd: RequestWrapUpCommand) -> Result<Wrap
|
|||||||
.find_existing(cmd.user_id, cmd.start_date, cmd.end_date)
|
.find_existing(cmd.user_id, cmd.start_date, cmd.end_date)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
if let Some(ref rec) = existing {
|
if let Some(ref rec) = existing
|
||||||
if rec.status == WrapUpStatus::Ready || rec.status == WrapUpStatus::Generating {
|
&& (rec.status == WrapUpStatus::Ready || rec.status == WrapUpStatus::Generating)
|
||||||
return Ok(rec.id.clone());
|
{
|
||||||
}
|
return Ok(rec.id.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
let id = WrapUpId::generate();
|
let id = WrapUpId::generate();
|
||||||
|
|||||||
Reference in New Issue
Block a user