Some select for updating and fix for #3259
A fix for #3259 (closed)
- The query was correct... but should be a locking query.
- When we want to lock a row we use select_for_update
- However, we actually want to lock that row and the related "extra page image" row.
- To lock that we need a select_related
- Unfortunately that will complain if the related object you are asking for can be none (which is the case for us)
- So we must explicitly exclude those none-possibilities
Needs a quick review (and maybe a discussion).