# HG changeset patch # User Maximilian Krambach # Date 1486475111 -3600 # Node ID ba106500af0b3d0ba61513642b3398cf899a844a # Parent c05a5534f0d9f6eac4d52caa2d4ad2f5ee989db1 Ortrecord in Ortszuordnung failed if there is no Staat diff -r c05a5534f0d9 -r ba106500af0b app/view/form/Ortszuordnung.js --- a/app/view/form/Ortszuordnung.js Tue Feb 07 12:48:20 2017 +0100 +++ b/app/view/form/Ortszuordnung.js Tue Feb 07 14:45:11 2017 +0100 @@ -158,14 +158,15 @@ var staat = staatStore.getById(ortrecord.get('staatId')); var ortinfo = this.down('ortinfo'); ortinfo.loadRecord(ortrecord); - ortinfo.getForm().setValues({ - staat: staat.get('staatIso'), - lon: ortrecord.get('longitude'), - lat: ortrecord.get('latitude') - }); - // some entries may not have a verwaltungseinheit if (verw !== null) { ortinfo.getForm().setValues({gemeinde: verw.get('bezeichnung')}); + } else { + ortinfo.getForm().setValues({gemeinde: ''}); + } + if (staat !== null) { + ortinfo.getForm().setValues({staat: staat.get('staatIso')}); + } else { + ortinfo.getForm().setValues({staat: ''}); } },