Jump to content

Module:Bharatdata: Difference between revisions

no edit summary
(Created page with "-- vim: set noexpandtab ft=lua ts=4 sw=4: require('Module:No globals') local p = {} local debug = false --------------------------------------------------------------------...")
 
No edit summary
Line 445: Line 445:
if input_parm ~= "FETCH_WIKIDATA" then
if input_parm ~= "FETCH_WIKIDATA" then
return false, input_parm, nil, nil
return false, input_parm, nil, nil
end
local entity = mw.wikibase.getEntity(qid)
local claims
if entity and entity.claims then
claims = entity.claims[propertyID]
if not claims then
return false, "", nil, nil
end
else
return false, "", nil, nil
end
end
return true, entity, claims, propertyID
return true, entity, claims, propertyID