Skip to content

Commit

Permalink
Allow a little more distance between polling places
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamoss committed Sep 2, 2024
1 parent 7027dd5 commit fae5694
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions django/demsausage/app/sausage/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
from demsausage.rq.jobs import task_regenerate_cached_election_data
from demsausage.util import (convert_string_to_number, get_env, is_numeric,
make_logger, merge_and_sum_dicts)
from rq import get_current_job

from django.contrib.gis.geos import Point
from django.db import transaction
from django.db.models import Q
from rq import get_current_job

logger = make_logger(__name__)

Expand Down Expand Up @@ -706,7 +707,7 @@ def _fetch_matching(polling_place):
return results
else:
self.logger.info(f"Doing noms migration by distance for {polling_place.name}")
return self.safe_find_by_distance("Noms Migration", polling_place.geom, distance_threshold_km=0.1, limit=None, qs=PollingPlaces.objects.filter(election=self.election, status=PollingPlaceStatus.DRAFT))
return self.safe_find_by_distance("Noms Migration", polling_place.geom, distance_threshold_km=0.125, limit=None, qs=PollingPlaces.objects.filter(election=self.election, status=PollingPlaceStatus.DRAFT))

# Migrate polling places with attached noms (and their stalls)
queryset = PollingPlaces.objects.filter(election=self.election, status=PollingPlaceStatus.ACTIVE, noms__isnull=False)
Expand Down

0 comments on commit fae5694

Please sign in to comment.