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,8 +134,9 @@ class App.ControllerTable extends App.Controller
for attribute in attributes
if rowWithoutId is attribute.name
if attribute.relation && App[ attribute.relation ]
record = App[ attribute.relation ].find( object[rowWithoutId] )
object[row.name] = record.name
if App[ attribute.relation ].exists( object[rowWithoutId] )
record = App[ attribute.relation ].find( object[rowWithoutId] )
object[row.name] = record.name
@log 'debug', 'table', 'header', header, 'overview', dataTypesForCols, 'objects', data.objects
table = App.view('generic/table')(