Module:WikidataCheck: Difference between revisions

Undo revision 133689 by WikiDwarf (talk)
No edit summary
(Undo revision 133689 by WikiDwarf (talk))
Tag: Undo
Line 23: Line 23:
if value == "" then
if value == "" then
return nil -- Using Wikidata
return nil -- Using Wikidata
end
local claims = entity.claims or {}
local hasProp = claims[property]
if not hasProp then -- no claim of that property
return "[[Category:" .. catbase .. " not in Wikidata]]" -- bad. Bot needs to add the property
end
end
for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values?
for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values?