service bug fix
parent
b462d6dd96
commit
2bf5cfc041
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue