Skip to content

Commit

Permalink
fix ui issue when deleting a one-to-X element
Browse files Browse the repository at this point in the history
  • Loading branch information
rande committed Jan 7, 2014
1 parent 18ae1b5 commit bd3b1d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Controller/HelperController.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ public function getShortObjectDescriptionAction(Request $request)

$object = $admin->getObject($objectId);

if (!$object) {
throw new NotFoundHttpException();
if (!$object && 'html' == $request->get('_format')) {
return new Response();
}

if ('json' == $request->get('_format')) {
Expand Down
2 changes: 1 addition & 1 deletion Resources/views/Helper/short-object-description.html.twig
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down

0 comments on commit bd3b1d8

Please sign in to comment.