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

[MARXAN-791] fix missing constraint leading to updating of rows that don't belong to the scenario being processed #548

Conversation

hotzevzl
Copy link
Member

@hotzevzl hotzevzl commented Sep 29, 2021

Without this constraint, all rows (of any scenarios in any project) would be overwritten.

For rows of the scenario being processed, the value of protected_area would be set to the correct value; for all other rows (other scenarios in any project), protected_area would be silently set to null as there is no data coming in via the CTE for rows that don't belong to the scenario being processed.

https://vizzuality.atlassian.net/browse/MARXAN-791

I still need to check whether all tiles now include the percentageProtected data, which should not have happened in any case at least for the scenario I was actively working on while triaging this issue.

Without this constraint, all rows (of any scenarios in any project)
would be overwritten.

For rows of the scenario being processed, the value of `protected_area`
would be set to the correct value; for all other rows (other scenarios
in any project), `protected_area` would be silently set to null as there
is no data coming in via the CTE for rows that don't belong to the
scenario being processed.
@vercel
Copy link

vercel bot commented Sep 29, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/9niHTetATtcEDuANKeGMeriedJE8
✅ Preview: https://marxan-git-fix-apimarxan-791scenario-protect-0f33a0-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/BEQUTRL6jLGnCziRnHaFGjkEFtEJ
✅ Preview: https://marxan-storybook-git-fix-apimarxan-791scenar-5764e7-vizzuality1.vercel.app

@hotzevzl hotzevzl requested a review from aagm September 29, 2021 16:16
@hotzevzl hotzevzl marked this pull request as draft September 29, 2021 16:17
@hotzevzl hotzevzl marked this pull request as ready for review September 30, 2021 09:53
@hotzevzl hotzevzl merged commit 1ae1296 into develop Sep 30, 2021
@hotzevzl hotzevzl deleted the fix/api/MARXAN-791_scenario-protected-area-calculation-is-reset branch September 30, 2021 09:53
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.

1 participant