@@ -180,8 +180,8 @@ class HelperController
$object = $admin->getObject($objectId);
- if (!$object) {
- throw new NotFoundHttpException();
+ if (!$object && 'html' == $request->get('_format')) {
+ return new Response();
}
if ('json' == $request->get('_format')) {
@@ -1,5 +1,5 @@
<span class="inner-field-short-description">
- {% if admin.hasRoute('edit') and admin.isGranted('EDIT') %}
+ {% if object and admin.hasRoute('edit') and admin.isGranted('EDIT') %}
<a href="{{ admin.generateObjectUrl('edit', object) }}" target="new">{{ description }}</a>
{% else %}
{{ description }}