Improved error handling.

This commit is contained in:
Martin Edenhofer 2013-12-26 22:52:14 +01:00
parent 3b8f6259b6
commit 7f4686ad71

View file

@ -134,6 +134,7 @@ class App.ControllerTable extends App.Controller
for attribute in attributes for attribute in attributes
if rowWithoutId is attribute.name if rowWithoutId is attribute.name
if attribute.relation && App[ attribute.relation ] if attribute.relation && App[ attribute.relation ]
if App[ attribute.relation ].exists( object[rowWithoutId] )
record = App[ attribute.relation ].find( object[rowWithoutId] ) record = App[ attribute.relation ].find( object[rowWithoutId] )
object[row.name] = record.name object[row.name] = record.name