-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of council boundary imports #7764
Draft
GeoWill
wants to merge
1
commit into
master
Choose a base branch
from
feature/out-of-boundary-imports
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GeoWill
force-pushed
the
feature/out-of-boundary-imports
branch
from
June 14, 2024 14:28
8689f7c
to
47950ea
Compare
GeoWill
force-pushed
the
feature/out-of-boundary-imports
branch
from
June 15, 2024 11:01
47950ea
to
6d411fb
Compare
GeoWill
commented
Jun 15, 2024
Comment on lines
+395
to
+413
self.set_polling_station_for_extra_councils( | ||
polling_station_id, uprns_assigned_to_station | ||
) | ||
|
||
uprns_assigned_to_station.filter(uprn__in=uprns).update( | ||
polling_station_id=polling_station_id | ||
) | ||
|
||
def set_polling_station_for_extra_councils( | ||
self, polling_station_id, uprns_assigned_to_station | ||
): | ||
# At this stage we want to know if the station has the right council id. | ||
# There are three cases: | ||
# 1. All the addresses are in the council named in the import script. | ||
# So the station will have the correct council_id and no action is necessary. | ||
# 2. All the addresses are in a different council. | ||
# In this case we need to update the council_id on the polling station in the pollingstations table | ||
# 3. The addresses assigned to this station are in different council areas. | ||
# In this case we need to duplicate the station making sure there are a record for each council_id. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach won't work, because the polling stations aren't saved in the DB yet.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.