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()); approvedSite.getId());
if (found != null) { if (found != null) {
manager.remove(approvedSite); manager.remove(found);
} else { } else {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }

View File

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