Revert "AccountManager: Check that ext ID belongs to account before delete"
I think this change didn't make sense. The external ID that is deleted
is initialized with the account ID of the new account, hence the check
added by this change would always match. If that external ID belonged
to another account it would have been overwritten when the external ID
was written with 'upsert' to the database.
This reverts commit 352be569f9.
Change-Id: Ibbbcaa77767ad06cef976a3236abc64ed1d8b71d
This commit is contained in:
@@ -351,9 +351,7 @@ public class AccountManager {
|
||||
// this is why the best we can do here is to fail early and cleanup
|
||||
// the database
|
||||
db.accounts().delete(Collections.singleton(account));
|
||||
if (account.getId().equals(extId.getAccountId())) {
|
||||
db.accountExternalIds().delete(Collections.singleton(extId));
|
||||
}
|
||||
db.accountExternalIds().delete(Collections.singleton(extId));
|
||||
throw new AccountUserNameException(errorMessage, e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user