service bug fix
parent
b462d6dd96
commit
2bf5cfc041
|
@ -62,7 +62,7 @@ public class JpaApprovedSiteRepository implements ApprovedSiteRepository {
|
|||
approvedSite.getId());
|
||||
|
||||
if (found != null) {
|
||||
manager.remove(approvedSite);
|
||||
manager.remove(found);
|
||||
} else {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue