From: Elena Mamontova Date: Mon, 8 Aug 2016 07:26:03 +0000 (+0300) Subject: Ticket 37. The object tariff definition moved into the if(newTariff) X-Git-Tag: 2.409~127 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/0bccec4ece837941fd6ff445bbfceb62be928788 Ticket 37. The object tariff definition moved into the if(newTariff) construction. --- diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp b/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp index b30b4e86..841fafa1 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/parser_users.cpp @@ -594,10 +594,10 @@ int CHG_USER::ApplyChanges() if (!m_ucr.tariffName.empty()) { - const TARIFF * tariff = u->GetTariff(); const TARIFF * newTariff = m_tariffs.FindByName(m_ucr.tariffName.const_data()); if (newTariff) { + const TARIFF * tariff = u->GetTariff(); if (tariff->TariffChangeIsAllowed(*newTariff) == "") { if (!u->GetProperty().tariffName.Set(m_ucr.tariffName.const_data(), &m_currAdmin, m_login, &m_store))