swaraj shinde commited on
Commit
ec87956
·
1 Parent(s): 448e49a
model_interface/a_16_harvest_forecast_V1_1_FARMGYAN.py CHANGED
@@ -144,7 +144,7 @@ def harvest_forecast_farmgyan():
144
  # NDVI FUNCTION (Loads connection only when called)
145
  # --------------------------------------------------------
146
  def get_ndvi_for_date(geofence_coords, date_str):
147
- global connection
148
 
149
  # Lazy load connection only when needed
150
  if connection is None:
 
144
  # NDVI FUNCTION (Loads connection only when called)
145
  # --------------------------------------------------------
146
  def get_ndvi_for_date(geofence_coords, date_str):
147
+ nonlocal connection
148
 
149
  # Lazy load connection only when needed
150
  if connection is None: