fix: collapse nested if in wrapup generate
Some checks failed
CI / Check / Test (push) Failing after 44s

This commit is contained in:
2026-06-02 22:20:29 +02:00
parent ea43911984
commit c0b3fb6940

View File

@@ -13,11 +13,11 @@ pub async fn execute(ctx: &AppContext, cmd: RequestWrapUpCommand) -> Result<Wrap
.find_existing(cmd.user_id, cmd.start_date, cmd.end_date)
.await?;
if let Some(ref rec) = existing {
if rec.status == WrapUpStatus::Ready || rec.status == WrapUpStatus::Generating {
if let Some(ref rec) = existing
&& (rec.status == WrapUpStatus::Ready || rec.status == WrapUpStatus::Generating)
{
return Ok(rec.id.clone());
}
}
let id = WrapUpId::generate();
let record = domain::models::wrapup::WrapUpRecord {