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

🐛 Force simple geometrycollection on sites #3399

Merged
merged 8 commits into from
Jan 9, 2023

Conversation

LePetitTim
Copy link
Contributor

No description provided.

@cypress
Copy link

cypress bot commented Jan 5, 2023



Test summary

24 0 0 0


Run details

Project Geotrek-admin
Status Passed
Commit 1d573e0 ℹ️
Started Jan 9, 2023 3:57 PM
Ended Jan 9, 2023 4:01 PM
Duration 03:46 💡
OS Linux Ubuntu - 20.04
Browser Electron 94

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Base: 98.23% // Head: 98.23% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (5186053) compared to base (17bcdc5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3399   +/-   ##
=======================================
  Coverage   98.23%   98.23%           
=======================================
  Files         291      291           
  Lines       20778    20781    +3     
=======================================
+ Hits        20412    20415    +3     
  Misses        366      366           
Impacted Files Coverage Δ
geotrek/outdoor/models.py 99.66% <100.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@LePetitTim LePetitTim force-pushed the fix_force_simple_geometrycollection branch from d091254 to 07b9331 Compare January 6, 2023 09:03
@LePetitTim LePetitTim requested a review from a team January 6, 2023 09:04
@LePetitTim LePetitTim linked an issue Jan 6, 2023 that may be closed by this pull request
@LePetitTim LePetitTim requested a review from submarcos January 9, 2023 12:50
]

operations = [
migrations.RunPython(flatten_geometrycollection),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
migrations.RunPython(flatten_geometrycollection),
migrations.RunPython(flatten_geometrycollection, migrations.RunPython.noop),

Copy link
Member

Choose a reason for hiding this comment

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

make reverse migration working

def test_validate_collection_geometrycollection(self):
site_simple = SiteFactory.create(name='site',
geom='GEOMETRYCOLLECTION(POINT(0 0), POLYGON((1 1, 2 2, 1 2, 1 1))))')
site_simple.refresh_from_db()
Copy link
Member

Choose a reason for hiding this comment

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

Ithink it would be better to refresh_from_db in save method, just after super().save(). If we create an instance by hand, real value is directly available

@LePetitTim LePetitTim merged commit e2546e4 into master Jan 9, 2023
@LePetitTim LePetitTim deleted the fix_force_simple_geometrycollection branch January 9, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sites' geometries
3 participants