From 1e2e3c9a7b80e2b56bbd03b62052395fb60a6ec6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Mon, 22 Oct 2018 01:07:23 -0400
Subject: [PATCH] manager: don't delete account if alias is empty

Change-Id: I93cc9a7e2c365bf84f64ef6ffbd05131b76ccfae
---
 src/manager.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/manager.cpp b/src/manager.cpp
index 8e04ebebde..c6519aa63b 100644
--- a/src/manager.cpp
+++ b/src/manager.cpp
@@ -557,13 +557,11 @@ Manager::ManagerPimpl::loadAccount(const YAML::Node &node, int &errorCount,
     std::string accountid;
     parseValue(node, "id", accountid);
 
-    std::string accountAlias;
-    parseValue(node, "alias", accountAlias);
     const auto inAccountOrder = [&](const std::string & id) {
         return accountOrder.find(id + "/") != std::string::npos;
     };
 
-    if (!accountid.empty() and !accountAlias.empty()) {
+    if (!accountid.empty()) {
         if (not inAccountOrder(accountid)) {
             RING_WARN("Dropping account %s, which is not in account order", accountid.c_str());
         } else if (base_.accountFactory.isSupportedType(accountType.c_str())) {
-- 
GitLab