refactoring
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
from CountriesMerger import CountriesMerger
|
from CountriesMerger import CountriesMerger
|
||||||
from CountriesByBatchcodeProvider import getCountriesByBatchcodeBeforeDeletion, getCountriesByClickedBatchcode
|
from CountriesByBatchcodeProvider import getCountriesByBatchcodeBeforeDeletion, getCountriesByClickedBatchcode
|
||||||
from BatchCodeTableFactory import BatchCodeTableFactory
|
from BatchCodeTableFactory import BatchCodeTableFactory
|
||||||
|
from src.CountriesColumnMerger import CountriesColumnMerger
|
||||||
|
|
||||||
class BatchCodeTableHavingGuessedCountriesFactory:
|
class BatchCodeTableHavingGuessedCountriesFactory:
|
||||||
|
|
||||||
@@ -20,13 +21,7 @@ class BatchCodeTableHavingGuessedCountriesFactory:
|
|||||||
return batchCodeTable
|
return batchCodeTable
|
||||||
|
|
||||||
def _guessCountries(self, batchCodeTable, countriesAsList):
|
def _guessCountries(self, batchCodeTable, countriesAsList):
|
||||||
self._mergeCountriesOfSrcIntoDst(
|
CountriesColumnMerger.mergeCountriesColumnOfSrcsIntoCountriesColumnOfDst(
|
||||||
dst = batchCodeTable,
|
dst = batchCodeTable,
|
||||||
src = self.countriesByBatchcodeBeforeDeletion)
|
srcs = [self.countriesByBatchcodeBeforeDeletion, self.countriesByClickedBatchcode])
|
||||||
self._mergeCountriesOfSrcIntoDst(
|
|
||||||
dst = batchCodeTable,
|
|
||||||
src = self.countriesByClickedBatchcode)
|
|
||||||
BatchCodeTableFactory._convertCountries(batchCodeTable, countriesAsList)
|
BatchCodeTableFactory._convertCountries(batchCodeTable, countriesAsList)
|
||||||
|
|
||||||
def _mergeCountriesOfSrcIntoDst(self, dst, src):
|
|
||||||
dst['Countries'] = CountriesMerger.mergeSrcIntoDst(dst = dst['Countries'], src = src['Countries'])
|
|
||||||
|
|||||||
Reference in New Issue
Block a user