Skip to content

Commit d8665df

Browse files
committed
INTEGRITY: Fix the fileset details being displayed in merge dashboard.
1 parent a1c97c3 commit d8665df

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

fileset.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -730,17 +730,20 @@ def confirm_merge(id):
730730
cursor.execute(
731731
"""
732732
SELECT
733-
fs.*,
733+
fs.id, fs.status, fs.src, fs.`key`, fs.megakey,
734+
fs.timestamp, fs.detection_size, fs.set_dat_metadata,
734735
g.name AS game_name,
735-
g.engine AS game_engine,
736+
e.name AS game_engine,
736737
g.platform AS game_platform,
737738
g.language AS game_language,
738739
(SELECT COUNT(*) FROM file WHERE fileset = fs.id) AS file_count
739-
FROM
740+
FROM
740741
fileset fs
741-
LEFT JOIN
742+
LEFT JOIN
742743
game g ON fs.game = g.id
743-
WHERE
744+
LEFT JOIN
745+
engine e ON g.engine = e.id
746+
WHERE
744747
fs.id = %s
745748
""",
746749
(id,),
@@ -761,16 +764,19 @@ def confirm_merge(id):
761764
cursor.execute(
762765
"""
763766
SELECT
764-
fs.*,
765-
g.name AS game_name,
766-
g.engine AS game_engine,
767+
fs.id, fs.status, fs.src, fs.`key`, fs.megakey,
768+
fs.timestamp, fs.detection_size, fs.set_dat_metadata,
769+
g.name AS game_name,
770+
e.name AS game_engine,
767771
g.platform AS game_platform,
768772
g.language AS game_language,
769773
(SELECT COUNT(*) FROM file WHERE fileset = fs.id) AS file_count
770774
FROM
771775
fileset fs
772776
LEFT JOIN
773777
game g ON fs.game = g.id
778+
LEFT JOIN
779+
engine e ON g.engine = e.id
774780
WHERE
775781
fs.id = %s
776782
""",
@@ -844,6 +850,7 @@ def highlight_differences(source, target):
844850
<tr><th style="width: 50px;">Field</th><th style="width: 1000px;">Source Fileset</th><th style="width: 1000px;">Target Fileset</th></tr>
845851
"""
846852

853+
# Fileset metadata
847854
for column in source_fileset.keys():
848855
source_value = str(source_fileset[column])
849856
target_value = str(target_fileset[column])
@@ -959,10 +966,8 @@ def highlight_differences(source, target):
959966
}
960967
)
961968
)
962-
if (
963-
os.path.basename(matched_source_filename).lower()
964-
in detection_files_set
965-
):
969+
970+
if matched_source_filename.lower() in detection_files_set:
966971
target_val = html_lib.escape(
967972
json.dumps(
968973
{

0 commit comments

Comments
 (0)