Skip to content

Commit

Permalink
database.files_db:FilesDB - update log_paths view to get paths for bo…
Browse files Browse the repository at this point in the history
…th original and master files
  • Loading branch information
MatteoCampinoti94 committed Nov 6, 2024
1 parent 0f982c7 commit 0b626b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion acacore/database/files_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ def __init__(
self.connection,
EventPath,
"log_paths",
f"select f.relative_path as file_relative_path, h.* from {self.log.name} h left join {self.original_files.name} f on f.uuid = h.uuid",
f"""
select coalesce(fo.relative_path, fm.relative_path) as file_relative_path, l.* from {self.log.name} l
left join {self.original_files.name} fo on l.file_type = 'original' and fo.uuid = l.uuid
left join {self.master_files.name} fm on l.file_type = 'master' and fm.uuid = l.uuid
""",
)

self.identification_warnings: View[OriginalFile] = View(
Expand Down

0 comments on commit 0b626b3

Please sign in to comment.