Skip to content

Commit 65137b4

Browse files
committed
Tidy up checklist items
1 parent 4882141 commit 65137b4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

O365/tasks.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,6 @@ def __init__(self, *, parent=None, con=None, **kwargs):
336336

337337
completed_obj = cloud_data.get(cc("completedDateTime"), {})
338338
self.__completed = self._parse_date_time_time_zone(completed_obj)
339-
checklist_items = cloud_data.get(cc("checklistItems"), [])
340-
self.checklist_items = (
341-
self.checklist_item_constructor(parent=self, **{self._cloud_data_key: item})
342-
for item in checklist_items
343-
)
344339

345340
def __str__(self):
346341
"""Representation of the Task via the Graph api as a string."""
@@ -734,11 +729,10 @@ def get_checklist_items(self, query=None, batch=None, order_by=None):
734729

735730
data = response.json()
736731

737-
self.checklist_items = (
732+
return (
738733
self.checklist_item_constructor(parent=self, **{self._cloud_data_key: item})
739734
for item in data.get("value", [])
740735
)
741-
return self.checklist_items
742736

743737
def get_checklist_item(self, param):
744738
"""Return a Checklist Item instance by it's id.

0 commit comments

Comments
 (0)