Add a condition to prevent removing existent detail object
Merge pull request #772 from sbagdat/patch-1

Add a condition to prevent removing existent detail object