diff --git a/src/services/member/service.rs b/src/services/member/service.rs index 084134c..f53eff6 100644 --- a/src/services/member/service.rs +++ b/src/services/member/service.rs @@ -207,7 +207,18 @@ impl Service<'_> { }) })?; - let parent_member_id = match request.referrer_member_username { + let referrer_member_username = match &request.referrer_member_username { + Some(d) => { + if d.trim().is_empty() { + None + } else { + Some(d.clone()) + } + }, + None => None, + }; + + let parent_member_id = match referrer_member_username { Some(referrer_member_username) => { match self .member_repository