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,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 {
|
||||
|
||||
Reference in New Issue
Block a user