Diferencia entre revisiones de «Módulo:Wikidata»
m Deshecha la edición 150888530 de Leoncastro (disc.) |
Devolver cadena vacía en lugar de nil cuando la propiedad no está definida en Wikidata, como se hacía antes. Ver Especial:EnlacePermanente/151214156#Población en la Ficha de localidad de España. |
||
| Línea 226: | Línea 226: | ||
elseif mw.wikibase.isValidEntityId(tostring(opciones.entityId)) and mw.wikibase.isValidEntityId(tostring(propiedad)) then | elseif mw.wikibase.isValidEntityId(tostring(opciones.entityId)) and mw.wikibase.isValidEntityId(tostring(propiedad)) then | ||
tablaOrdenada = mw.wikibase.getAllStatements( opciones.entityId, mw.ustring.upper(propiedad) ) | tablaOrdenada = mw.wikibase.getAllStatements( opciones.entityId, mw.ustring.upper(propiedad) ) | ||
if not tablaOrdenada[1] then return '' end | |||
else | else | ||
return '' | return '' | ||