Content deleted Content added
Fix for when a P444 is set with no qualifiers. |
|||
Line 466:
local reviewsToPrint = {}
for i,review in pairs(reviewscores) do
local scoreBy = nil
if(review['qualifiers']['P447'] ~= nil and if(review['qualifiers']['P447'] ~= nil and review['qualifiers']['P447'][1] ~= nil) then▼
▲ scoreBy = review['qualifiers']['P447'][1]['datavalue']['value']['numeric-id'];
-- If template specified a system, we need to check for the specific system and only output that one.
▲ end;
if(
--
-- Get platform if it exists.
▲ table.insert(reviewsToPrint,review);
▲ else
--
if(systemId == reviewSysId) then
-- Try to match based on QID.▼
▲ if(systemId == reviewSysId) then
table.insert(reviewsToPrint,review);
▲ else
▲ local systemName = mw.wikibase.label('Q'..reviewSysId);
▲ if(systemName ~= nil and string.upper(systemName) == system) then
▲ table.insert(reviewsToPrint,review);
end;
end;
|