Skip to content

Commit

Permalink
get optional properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Woyken committed Sep 30, 2023
1 parent 4090b49 commit d7e4d75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lidlplus/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ def activate_coupons(args):
if not args.get("all"):
return
i = 0
for section in lidl_plus.coupons()["sections"]:
for coupon in section["coupons"]:
for section in lidl_plus.coupons().get("sections", {}):
for coupon in section.get("coupons", {}):
if coupon["isActivated"]:
continue
if datetime.fromisoformat(coupon["startValidityDate"]) > datetime.now():
Expand Down

0 comments on commit d7e4d75

Please sign in to comment.