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

Do not rely on indexes when retrieving context rows #371

Open
julen opened this issue Aug 5, 2019 · 0 comments
Open

Do not rely on indexes when retrieving context rows #371

julen opened this issue Aug 5, 2019 · 0 comments
Labels

Comments

@julen
Copy link
Contributor

julen commented Aug 5, 2019

Context row retrieval relies on unit indexes within a store, and fetches the before/after units for a unit as shown in the following snippet: https://github.com/evernote/zing/blob/e937daa01a8eff24c21a04ba0aacf79138d1a65a/pootle/apps/pootle_store/views.py#L200-L209

The code expects units to have consecutive indexing, but that's not always true for live, non-obsolete units.

So this becomes problematic especially in stores with larger amounts of units, because chances are higher units will become obsolete at a certain point in time, which leaves gaps between indexes. For users, the end result is that irrelevant units end up being displayed as context units.

All in all we need to change how retrieval is done to avoid relying on indexes.

@julen julen added the bug label Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant