Skip to content

Commit a8aa7d9

Browse files
JoleVLFJoleVLF
authored andcommitted
update: Disable parcel without GK
1 parent b51d5b2 commit a8aa7d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/utils/farm_calendar_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def create_farm_calendar_pdf(
250250
.get("@id", "N/A:N/A")
251251
.split(":")[-1]
252252
)
253-
address, farm = get_parcel_info(parcel_id, token, geolocator)
253+
address, farm, _ = get_parcel_info(parcel_id, token, geolocator)
254254
row.cell(f"{machinery_ids}")
255255
row.cell(address)
256256
row.cell(farm)
@@ -270,7 +270,7 @@ def create_farm_calendar_pdf(
270270
if merged_data:
271271
merged_data.sort(
272272
key=lambda item: getattr(item, "hasStartDatetime")
273-
or getattr(item, "phenomenonTime")
273+
or getattr(item, "phenomenonTime", None)
274274
)
275275
pdf.ln()
276276
pdf.set_fill_color(0, 255, 255)

0 commit comments

Comments
 (0)