Skip to content

Commit

Permalink
Update basic_contact.py
Browse files Browse the repository at this point in the history
  • Loading branch information
george0st committed Apr 16, 2024
1 parent fa7d4f4 commit 5506269
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions generator/basic_contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,16 @@ def generate(self, count):
if self.rnd_bool() else ContactEnum.Phone

# "name": "contact-email"
model['contact-email']=self.fake.email() if contact_detail & ContactEnum.Email else ""
if contact_detail & ContactEnum.Email:
model['contact-email'] = self.fake.email()
else:
model['contact-email'] = ""

# "name": "contact-phone"
model['contact-phone']=self.fake.phone_number() if contact_detail & ContactEnum.Phone else ""
if contact_detail & ContactEnum.Phone:
model['contact-phone'] = self.fake.phone_number()
else:
model['contact-phone'] = ""

# "name": "contact-state"
if count==0:
Expand All @@ -70,4 +76,3 @@ def generate(self, count):
model['record-date']=self.gmodel["NOW"]

self.model.append(model)

0 comments on commit 5506269

Please sign in to comment.