si no existe registro de letrero, se crea

develop/frontend
Francisco Sandoval 2023-11-12 21:37:42 -03:00
parent 0622c962ae
commit 146ab19f9a
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
async function onEdita({ linea: { id_linea } }) {
try {
const linea = await getLinea(id_linea)
const letrero = await getLetreroLUR(linea.route_short_name)
const letrero = await getLetreroLUR(linea.route_short_name).catch(() => Promise.resolve({}))
ruta = { ...linea, ...letrero }
} catch (error) {
console.log({ error })

View File

@ -25,7 +25,7 @@
await createLinea({ route_short_name, route_long_name })
}
await deleteLetreroLUR(route_short_name)
await deleteLetreroLUR(route_short_name).catch(() => {})
await createLetreroLUR({
codigo: route_short_name,
linea1, linea2, linea3, linea4,