Avoid the Change model by default, for CSV -> CORE import

This commit is contained in:
Lance Edgar 2023-06-09 17:41:32 -05:00
parent 95fcf054ef
commit 6267205966

View file

@ -48,3 +48,13 @@ class FromCSVToCore(FromCSVToSQLAlchemyMixin, FromFileHandler, ToCoreHandler):
def make_session(self):
return CoreSession(bind=self.config.corepos_engines[self.dbkey])
def get_default_keys(self):
keys = super().get_default_keys()
# error will occur for any missing files, when running for all
# default models. so make sure some of these are not default.
if 'Change' in keys:
keys.remove('Change')
return keys