|
@@ -104,8 +104,8 @@ class RootController(BaseController):
|
104
|
104
|
loCurrentNode = None
|
105
|
105
|
loNodeStatusList = None
|
106
|
106
|
try:
|
107
|
|
- loCurrentNode = loApiController.getNode(liNodeId)
|
108
|
107
|
loNodeStatusList = pbmd.PBNodeStatus.getList()
|
|
108
|
+ loCurrentNode = loApiController.getNode(liNodeId)
|
109
|
109
|
except Exception, e:
|
110
|
110
|
flash(_('Document not found'), 'error')
|
111
|
111
|
|
|
@@ -113,7 +113,9 @@ class RootController(BaseController):
|
113
|
113
|
# the correct behavior should be to redirect to setup page
|
114
|
114
|
if loCurrentNode is None:
|
115
|
115
|
loCurrentNode = loApiController.getNode(0) # try to get an item
|
116
|
|
- if loCurrentNode is None:
|
|
116
|
+ if loCurrentNode is not None:
|
|
117
|
+ flash(_('Document not found. Randomly showing item #%i')%(loCurrentNode.node_id), 'warning')
|
|
118
|
+ else:
|
117
|
119
|
flash(_('Your first document has been automatically created'), 'info')
|
118
|
120
|
loCurrentNode = loApiController.createDummyNode()
|
119
|
121
|
pm.DBSession.flush()
|