File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,8 @@ def get_lists(self):
377
377
return [self .list_constructor (parent = self , ** {self ._cloud_data_key : lst }) for lst in data .get ('value' , [])]
378
378
379
379
def get_list_by_name (self , display_name ):
380
- """ Returns a sharepoint list based on the display name of the list
380
+ """
381
+ Returns a sharepoint list based on the display name of the list
381
382
"""
382
383
383
384
if not display_name :
Original file line number Diff line number Diff line change @@ -512,14 +512,17 @@ def __next__(self):
512
512
data = data .get ('value' , [])
513
513
if self .constructor :
514
514
# Everything from cloud must be passed as self._cloud_data_key
515
- if callable (self .constructor ) and not isinstance (self .constructor ,
516
- type ):
517
- self .data = [self .constructor (value )(parent = self .parent , ** {
518
- self ._cloud_data_key : value }, ** self .extra_args ) for value in data ]
515
+ self .data = []
516
+ kwargs = {}
517
+ kwargs .update (self .extra_args )
518
+ if callable (self .constructor ) and not isinstance (self .constructor , type ):
519
+ for value in data :
520
+ kwargs [self ._cloud_data_key ] = value
521
+ self .data .append (self .constructor (value )(parent = self .parent , ** kwargs ))
519
522
else :
520
- self . data = [ self . constructor ( parent = self . parent ,
521
- ** { self ._cloud_data_key : value }, ** self . extra_args )
522
- for value in data ]
523
+ for value in data :
524
+ kwargs [ self ._cloud_data_key ] = value
525
+ self . data . append ( self . constructor ( parent = self . parent , ** kwargs ))
523
526
else :
524
527
self .data = data
525
528
You can’t perform that action at this time.
0 commit comments