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

Fix MapLocation json_data to return mappable ids #2613

Merged
merged 1 commit into from
Apr 25, 2018

Conversation

bertocq
Copy link
Collaborator

@bertocq bertocq commented Apr 25, 2018

References

This is a backport from Madrid's fork merged & tested in production PR AyuntamientoMadrid#1444

Objectives

The map at /budgets its showing some Investments that have no geolocalization, or even are from previous Budgets!

That's because right now code was returning current Budget MapLocation's IDs, and the JS is looking for Investments by those ids... sometimes finding a record with same ID but totally NOT the one associated to the MapLocation.

Visual Changes (if any)

None

Notes

Map feature still needs some important refactors to make increase our confidence in the code.

Until we correctly make MapLocation relation with mappables a polymorphic
one... we'll need to return the investment_id and proposal_id values.

Right now it was returning the MapLocation ID, and the JS was making a
call searching for an Investment with the MapLocation ID... sometimes
finding a record with same ID but totally NOT the one associated to the
MapLocation.
@bertocq bertocq merged commit f330aea into master Apr 25, 2018
@bertocq bertocq deleted the fixup_investments_map branch April 25, 2018 19:15
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.

None yet

2 participants