Windmill Markets limit count fix
This commit is contained in:
parent
ac802ab944
commit
cfdb06083b
|
@ -100,6 +100,7 @@ def nailsea_farmers(start_date: date, months: int = 24) -> list[Event]:
|
||||||
while count < months:
|
while count < months:
|
||||||
# Calculate the 3rd Saturday of the current month
|
# Calculate the 3rd Saturday of the current month
|
||||||
third_saturday = current_date + relativedelta(day=1, weekday=SA(+3))
|
third_saturday = current_date + relativedelta(day=1, weekday=SA(+3))
|
||||||
|
count += 1
|
||||||
|
|
||||||
# Include it in the list only if it's on or after the start_date
|
# Include it in the list only if it's on or after the start_date
|
||||||
if third_saturday >= start_date:
|
if third_saturday >= start_date:
|
||||||
|
@ -110,7 +111,6 @@ def nailsea_farmers(start_date: date, months: int = 24) -> list[Event]:
|
||||||
date=uk_tz.localize(datetime.combine(third_saturday, t)),
|
date=uk_tz.localize(datetime.combine(third_saturday, t)),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
count += 1
|
|
||||||
|
|
||||||
# Move to the next month
|
# Move to the next month
|
||||||
current_date += relativedelta(months=1)
|
current_date += relativedelta(months=1)
|
||||||
|
|
Loading…
Reference in a new issue