mirror of
https://github.com/Cernobor/oko-server.git
synced 2025-02-24 08:27:17 +00:00
Bugfix: failsafe join for images.
* Added failsafe join to only provide images that are bound to some photos.
This commit is contained in:
parent
19fc8e0322
commit
7b1c3cfc28
@ -410,7 +410,7 @@ func (s *Server) getDataWithPhotos() (file *os.File, err error) {
|
||||
return nil, fmt.Errorf("failed to write data zip entry: %w", err)
|
||||
}
|
||||
|
||||
err = sqlitex.Exec(conn, "select id from feature_photos", func(stmt *sqlite.Stmt) error {
|
||||
err = sqlitex.Exec(conn, "select id from feature_photos fp where exists (select 1 from features f where f.id = fp.feature_id)", func(stmt *sqlite.Stmt) error {
|
||||
id := stmt.ColumnInt64(0)
|
||||
|
||||
blob, err := conn.OpenBlob("", "feature_photos", "thumbnail_contents", id, false)
|
||||
|
Loading…
Reference in New Issue
Block a user