dhmit / paris_1970

Fall 2020 Project: This was Paris in 1970
9 stars 5 forks source link

previous_next_photos should not increment/decrement by ID #254

Open ryaanahmed opened 2 years ago

ryaanahmed commented 2 years ago

app.views.previous_next_photos looks for the previous/next photos in a given map square.

Currently it does this by looking at the photos with the next lower/higher database id number. This relies on all photos in a given map square having sequential ids, which is something we do not guarantee. Currently it works because all of our methods for rebuilding the database do actually enter photos in order, but we shouldn't rely on this.

Instead, it should increment/decrement via Photo.number and Photo.folder.