Skip to content

Commit 47f67b3

Browse files
committed
Fixed None in generator and width
1 parent a7d6201 commit 47f67b3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

for_dict_challenges_bonus.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ def generate_chat_history():
5050
"id": uuid.uuid4(),
5151
"sent_at": sent_at,
5252
"sent_by": random.choice(users_ids),
53-
"reply_for": random.choice([
54-
None,
55-
random.choice([m["id"] for m in messages])
56-
if messages else None]),
53+
"reply_for": random.choice(
54+
[
55+
None,
56+
(
57+
random.choice([m["id"] for m in messages])
58+
if messages else None
59+
),
60+
],
61+
),
5762
"seen_by": random.sample(users_ids,
5863
random.randint(1, len(users_ids))),
5964
"text": lorem.sentence(),

0 commit comments

Comments
 (0)