This PR fix a NPE when fetching annual data on a contract without previous year data (new contract or a move). It also fix a NPE when the CLI failed to authenticate and try to clean a non-existent session.
Steps to reproduce :
With a contract without previous data, invoke the cli with the following options :
-u xxx-user--xxx -p xxx-password-xxx -c xxx-14123-xxx -L INFO
it could also be reproduce with the -H option
Last logged line should contain Fetching annual data
An out of context 'compare' message should be printed
Expected behavior : The CLI should not crash and report the current year data
This PR fix a NPE when fetching annual data on a contract without previous year data (new contract or a move). It also fix a NPE when the CLI failed to authenticate and try to clean a non-existent session.
Steps to reproduce :
-u xxx-user--xxx -p xxx-password-xxx -c xxx-14123-xxx -L INFO
-H
optionExpected behavior : The CLI should not crash and report the current year data