Skip to content

Commit b547d2a

Browse files
authored
Merge pull request #8 from openagri-eu/bug-issue-48-update
update: Disable parcel without GK && bugfix
2 parents a8aa7d9 + 64abc87 commit b547d2a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

app/utils/farm_calendar_report.py

Lines changed: 1 addition & 1 deletion
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)

app/utils/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def get_parcel_info(parcel_id: str, token: dict, geolocator: Nominatim, identifi
6565
farm = ''
6666
identifier = ''
6767
if not settings.REPORTING_USING_GATEKEEPER:
68-
return address, farm, identifier
68+
if identifier_flag:
69+
return address, farm, identifier
70+
else:
71+
return address, farm
6972
farm_parcel_info = make_get_request(
7073
url=f'{settings.REPORTING_FARMCALENDAR_BASE_URL}{settings.REPORTING_FARMCALENDAR_URLS["parcel"]}{parcel_id}/',
7174
token=token,

0 commit comments

Comments
 (0)