ID 603824 - The Flix Client crashes with Error 500 when opening the Library tab when some Panels are missing artwork Assets

Follow

Problem summary:
The Flix Client crashes with Error 500 when opening the Library tab when some Panels are missing artwork Assets
 
Customer reported version:
Flix 7.1.1
 
Customer reported platform:
CentOS 7
 
Steps to reproduce:
1) Open Flix using the attached database file
2) Navigate to one of the affected Shows: 2, 11, 13, 14, 15
3) Open a Revision, and switch to the Library tab
 
Alternate steps:
1) Manually disassociate an Asset from a Panel Revision in the database, like with the following Query: 

DELETE FROM vPanel_asset_ref WHERE show_id = 13 AND sequence_id = 193 AND panel_id = 1 AND panel_revision = 1;
 
Expected behavior:
The Flix Client should gracefully handle Panels that are missing artwork Assets.
 
Actual behavior:
If a panel revision does not have an associated Asset in the MySQL database, opening the Library tab can cause the Flix Client to crash with an Error 500  message. 
 
Workaround:
1) Run the following query to list affected Panel Revisions:
SELECT vPanel.*FROM vPanel    LEFT JOIN vPanel_asset_ref    ON (vPanel_asset_ref.show_id, vPanel_asset_ref.sequence_id, vPanel_asset_ref.panel_id, vPanel_asset_ref.vPanel_id) =       (vPanel.show_id, vPanel.sequence_id, vPanel.panel_id, vPanel.panel_revision)WHERE vPanel_asset_ref.asset_id IS NULL;
2) Open any Sequence Revision in the Show you want to repair.
3) Create a new blank panel (Note: you do not need to save the Sequence Revision). This will cause Flix to generate a new show-specific blank asset if there is none already.
4) Then, run the query below to turn any Panel Revision that is missing artwork into a blank panel by associating it with the blank asset for the show. This query only updates panels within the given Show (Show ID 13 in this example):
INSERT INTO vPanel_asset_ref (show_id, sequence_id, panel_id, vPanel_id, asset_id)SELECT vPanel.show_id, vPanel.sequence_id, vPanel.panel_id, vPanel.panel_revision, shows_blank_asset.asset_idFROM vPanel    JOIN shows_blank_asset on vPanel.show_id = shows_blank_asset.show_idWHERE vPanel.show_id = 13  AND NOT EXISTS (SELECT 1                  FROM vPanel_asset_ref                  WHERE (vPanel_asset_ref.show_id, vPanel_asset_ref.sequence_id, vPanel_asset_ref.panel_id, vPanel_asset_ref.vPanel_id) =                        (vPanel.show_id, vPanel.sequence_id, vPanel.panel_id, vPanel.panel_revision));
  
Reproduced by Development team

    We're sorry to hear that

    Please tell us why