From 2aea4f1a16bfdf4406ab9de60a6c21f7e896e975 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Tue, 23 Aug 2022 07:35:04 +0000 Subject: [PATCH] bug fixed --- src/services/member/service.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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