-
Notifications
You must be signed in to change notification settings - Fork 261
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
Data from db/export.csv should get "edit_id" values matching their "id" values (currently all set to zero) #541
Comments
I'm also unsure if we should even be grouping by I think that value should always be unique, and we should group by If I understand it correctly:
Thus no two entries have a shared Might be wrong about this, would love some comment from @mi-wood and/or @stardust66. |
From the way I understand the editing process, when an edit is submitted, a new restroom entry is made with a new I'm taking a look at |
Edit: Whoops, I guess not. There are no field names in the |
I have a branch where I seem to have fixed this: DeeDeeG@27d3e15 Based on this stackoverflow answer: https://stackoverflow.com/a/12408934 |
Scope / difficulty of fixing this
Not too hard I hope?
Impact
Only affects local testing (in Docker, Vagrant, etc.) with the
db/export.csv
data. Fixing this will make the data fromdb/export.csv
behave properly alongside the new user edit proposals system.This has no bearing on our production instance, because the data there all have proper
edit_id
values.Problem
Data in
db/export.csv
have no actualedit_id
values to begin with.Rather than being migrated (or otherwise automatically processed) to have an
edit_id
matching theirid
, they all end up havingedit_id: 0
.Since we now group API results by
edit_id
and only display one result peredit_id
, the app only ever displays at most one result regardless of the specifics of the API call. (This will tend to be the Dolores Park Cafe entry, since it has the highestid
value).(From the documentary about software development, Highlander: "There can be only one!")
How to reproduce the problem
Proposed solution to this bug
Process the
db/export.csv
data in some way (a migration? somewhere else in our Ruby code?) so they haveedit_id
values matching theirid
values.The text was updated successfully, but these errors were encountered: