Skip to content
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

Update boundaries geometry 3 #5787

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

norkans7
Copy link

No description provided.

@norkans7 norkans7 changed the base branch from remove-postgis-2 to update-boundaries-geometry-2 January 10, 2025 15:00
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (33605a8) to head (2f2d35a).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #5787   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          448       448           
  Lines        25121     25113    -8     
=========================================
- Hits         25121     25113    -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@norkans7 norkans7 force-pushed the update-boundaries-geometry-3 branch from 267c7bc to 7563744 Compare January 10, 2025 15:19
@norkans7 norkans7 force-pushed the update-boundaries-geometry-2 branch 2 times, most recently from 63f458e to 91c9f16 Compare January 10, 2025 20:41
Base automatically changed from update-boundaries-geometry-2 to main January 13, 2025 14:27
@norkans7 norkans7 force-pushed the update-boundaries-geometry-3 branch from 7563744 to f8998bd Compare January 13, 2025 15:42
@norkans7 norkans7 requested a review from rowanseymour January 13, 2025 17:08
@norkans7 norkans7 marked this pull request as ready for review January 13, 2025 17:08
@norkans7 norkans7 force-pushed the update-boundaries-geometry-3 branch from 26831cf to e47d080 Compare January 13, 2025 17:08
@@ -135,8 +135,8 @@ def get_aliases(self, obj):
return [alias.name for alias in obj.aliases.all()]

def get_geometry(self, obj):
if self.context["include_geometry"] and obj.simplified_geometry:
return json.loads(obj.simplified_geometry.geojson)
if self.context["include_geometry"] and obj.geometry:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there such a thing as a location without geometry ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also this method can be simplified to return obj.geometry if self.context["include_geometry"] else None

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there such a thing as a location without geometry ?

Just checked on prod and answer is no

@@ -67,7 +67,7 @@ def get_geojson_feature(self):
return geojson.Feature(
properties=dict(name=self.name, osm_id=self.osm_id, id=self.pk, level=self.level),
zoomable=True if self.children.all() else False,
geometry=None if not self.simplified_geometry else geojson.loads(self.simplified_geometry.geojson),
geometry=self.geometry or None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or None doesn't do anything here...

@norkans7 norkans7 force-pushed the update-boundaries-geometry-3 branch from e47d080 to ecb09fb Compare January 13, 2025 19:06
@norkans7 norkans7 force-pushed the update-boundaries-geometry-3 branch from ecb09fb to 2f2d35a Compare January 13, 2025 19:19
@rowanseymour rowanseymour merged commit 92a8c73 into main Jan 13, 2025
5 checks passed
@rowanseymour rowanseymour deleted the update-boundaries-geometry-3 branch January 13, 2025 19:35
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants