Skip to content

Commit 0b2f636

Browse files
committed
ENH: Remove unnecessary setting of missing attributes before validation
skipci
1 parent d744a08 commit 0b2f636

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

octue/cloud/events/extraction.py

-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ def extract_and_deserialise_attributes(container):
1010
"""
1111
# Cast attributes to a dictionary to avoid defaultdict-like behaviour from Pub/Sub message attributes container.
1212
attributes = dict(get_nested_attribute(container, "attributes"))
13-
1413
retry_count = attributes.get("retry_count")
1514

1615
if retry_count:
1716
attributes["retry_count"] = int(retry_count)
18-
else:
19-
attributes["retry_count"] = None
2017

2118
if attributes.get("sender_type") == "PARENT":
2219
attributes = _deserialise_question_attributes(attributes)
@@ -35,8 +32,6 @@ def _deserialise_question_attributes(attributes):
3532

3633
if forward_logs:
3734
attributes["forward_logs"] = bool(int(forward_logs))
38-
else:
39-
attributes["forward_logs"] = None
4035

4136
cpus = attributes.get("cpus")
4237

0 commit comments

Comments
 (0)