Fix cargo clippy issues
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-08-28 08:15:50 +02:00
parent 6e53486832
commit 0540f515ec
6 changed files with 29 additions and 43 deletions

View File

@@ -48,23 +48,20 @@ impl CoupleRequest {
}
}
if let Some(husband) = self.husband {
if !members_service::exists(couple.family_id(), husband).await? {
if let Some(husband) = self.husband
&& !members_service::exists(couple.family_id(), husband).await? {
return Err(CoupleControllerErr::HusbandNotExisting.into());
}
}
if let Some(d) = &self.wedding {
if !d.check() {
if let Some(d) = &self.wedding
&& !d.check() {
return Err(CoupleControllerErr::MalformedDateOfWedding.into());
}
}
if let Some(d) = &self.divorce {
if !d.check() {
if let Some(d) = &self.divorce
&& !d.check() {
return Err(CoupleControllerErr::MalformedDateOfDivorce.into());
}
}
couple.set_wife(self.wife);
couple.set_husband(self.husband);