Merge pull request #2014 from ssilvert/KEYCLOAK-2294-pi-testrealm

KEYCLOAK-2294 Partial import can fail with 'Removing a detached insta…
This commit is contained in:
Stian Thorgersen 2016-01-13 08:37:49 +01:00
commit 2f88868e20

View file

@ -69,7 +69,7 @@ public class ClientsPartialImport extends AbstractPartialImport<ClientRepresenta
@Override
public void remove(RealmModel realm, KeycloakSession session, ClientRepresentation clientRep) {
ClientModel clientModel = realm.getClientByClientId(getName(clientRep));
new ClientManager(new RealmManager(session)).removeClient(realm, clientModel);
realm.removeClient(clientModel.getId());
}
@Override