Exemplo n.º 1
0
 def import_into_tbl_batch_import(self, object_store: ObjectStore):
     batch_import = BatchImport()
     batch_import.batch_import_type_id = self._batch_import_type_id
     batch_import.filename = self._batch_import_filename
     batch_import.entity_id = self._batch_import_entity_id
     batch_import.processed = self._batch_import_processed_date
     batch_import.notes = self._batch_import_notes
     DBSession.add(batch_import)
     DBSession.flush()
     object_store.set_new_object("batch_import_id", batch_import.id)
Exemplo n.º 2
0
 def write_confirmation_results_to_tables(self) -> None:
     batch_import_error = BatchImportError()
     batch_import_error.batch_import_id = self._batch_import_id
     batch_import_error.message = self._batch_import_error_message
     DBSession.add(batch_import_error)
     DBSession.flush()
Exemplo n.º 3
0
 def set_notes_to_import(self, batch_import_id: int) -> None:
     batch_import = BatchImport.by_id(batch_import_id)
     batch_import.notes = "Start>Parse=>Import"
     DBSession.flush()
Exemplo n.º 4
0
 def set_notes_on_tbl_batch_import_to_parse(self) -> None:
     batch_import = BatchImport.by_id(self._batch_import_id)
     batch_import.notes = "Start=>Parse"
     DBSession.flush()
Exemplo n.º 5
0
 def by_id(cls, id):
     """Return the user object whose id address is ``id``."""
     return DBSession.query(cls).filter_by(id=id).first()
Exemplo n.º 6
0
 def by_guid(cls, guid):
     return DBSession.query(cls).filter_by(guid=guid).first()
Exemplo n.º 7
0
 def by_username(cls, username):
     """Return the user object whose user name is ``username``."""
     return DBSession.query(cls).filter_by(username=username).first()
Exemplo n.º 8
0
 def by_email(cls, email):
     """Return the user object whose email address is ``email``."""
     return DBSession.query(cls).filter_by(email=email).first()