Allow external IDs for account with ID 0
Account IDs are expected to be positive but somehow we have a least one account with ID 0. External IDs for this account are ignored when the external IDs are loaded and an error is logged. Relax the account ID check when external IDs are loaded and allow external IDs for accounts with ID 0. On writing external IDs for such an account there is no problem, since any account ID that resolves to an existing account is allowed. Change-Id: I50091a54ebb803110fe0332f60b49615ffb9df34 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -240,7 +240,7 @@ public abstract class ExternalId implements Serializable {
|
||||
try {
|
||||
int accountId =
|
||||
externalIdConfig.getInt(EXTERNAL_ID_SECTION, externalIdKeyStr, ACCOUNT_ID_KEY, -1);
|
||||
if (accountId <= 0) {
|
||||
if (accountId < 0) {
|
||||
throw invalidConfig(
|
||||
noteId,
|
||||
String.format(
|
||||
|
Reference in New Issue
Block a user