But it will be the list with dublicates of thing? for example: [[thing_1, photo_1],[thing_1, photo_2],[thing_1, photo_3],[thing_2, photo_4],[thing_2, photo_5]]
But I need unique things with just one or zero photo per thing, like: [[thing_1, photo_1],[thing_2, photo_4], [thing_3, None]] On 5 май, 15:43, rāma <[email protected]> wrote: > the loop is wrong. The below will be it. > > list=[] > > for row in query: > > list.append([row.things.title, row.photos_things.photo_id.image])

