File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1515class Fulfillment (BaseModel ):
1616 @property
1717 def new_items (self ):
18- return [ i for i in self . asset . items if i . quantity > 0 and i .old_quantity == 0 ]
18+ return filter ( lambda item : item . quantity > 0 and item .old_quantity == 0 , self . asset . items )
1919
2020 @property
2121 def changed_items (self ):
22- return [ i for i in self . asset . items if i . quantity > 0 and i .old_quantity > 0 ]
22+ return filter ( lambda item : item . quantity > 0 and item .old_quantity > 0 , self . asset . items )
2323
2424 @property
2525 def removed_items (self ):
26- return [ i for i in self . asset . items if i . quantity == 0 and i .old_quantity > 0 ]
26+ return filter ( lambda item : item . quantity == 0 and item .old_quantity > 0 , self . asset . items )
2727
2828
2929class FulfillmentSchema (BaseSchema ):
You can’t perform that action at this time.
0 commit comments