service bug fix

pull/210/head
Justin Richer 2012-08-28 14:17:42 -04:00
parent b462d6dd96
commit 2bf5cfc041
2 changed files with 3 additions and 4 deletions

View File

@ -62,7 +62,7 @@ public class JpaApprovedSiteRepository implements ApprovedSiteRepository {
approvedSite.getId());
if (found != null) {
manager.remove(approvedSite);
manager.remove(found);
} else {
throw new IllegalArgumentException();
}

View File

@ -57,11 +57,10 @@ public class JpaWhitelistedSiteRepository implements WhitelistedSiteRepository {
@Override
@Transactional
public void remove(WhitelistedSite whitelistedSite) {
WhitelistedSite found = manager.find(WhitelistedSite.class,
whitelistedSite.getId());
WhitelistedSite found = manager.find(WhitelistedSite.class, whitelistedSite.getId());
if (found != null) {
manager.remove(whitelistedSite);
manager.remove(found);
} else {
throw new IllegalArgumentException();
}