refactoring

This commit is contained in:
frankknoll
2023-04-03 00:06:36 +02:00
parent a5b95c9318
commit 2acaba79fe

View File

@@ -29,10 +29,7 @@ class BatchCodeTableFactory:
def _getBatchCodeTableByCountry(self, country): def _getBatchCodeTableByCountry(self, country):
countryBatchCodeTable = self._getCountryBatchCodeTable() countryBatchCodeTable = self._getCountryBatchCodeTable()
if country in countryBatchCodeTable.index: return countryBatchCodeTable.loc[country] if country in countryBatchCodeTable.index else self._getEmptyBatchCodeTable(countryBatchCodeTable)
return countryBatchCodeTable.loc[country]
else:
return self._getEmptyBatchCodeTable(countryBatchCodeTable)
def _getCountryBatchCodeTable(self): def _getCountryBatchCodeTable(self):
return SummationTableFactory.createSummationTable( return SummationTableFactory.createSummationTable(