Skip to content
Snippets Groups Projects
Commit 1c8aef71 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

ENH: Add sample post-processing dummy

parent 7d6ad359
No related branches found
No related tags found
1 merge request!1F awi sams
......@@ -11,10 +11,12 @@ from caosadvancedtools.serverside.logging import configure_server_side_logging
from bis_utils import (create_email_with_link_text,
get_description_row, get_email_from_username,
get_options_row, send_mail_with_defaults)
from sample_helpers.sample_registration_post_processing import post_process_samples
from sample_helpers.utils import CONSTANTS, get_column_header_name, get_entity_name
ERROR_PREFIX = CONSTANTS["error_prefix"]
ERROR_SUFFIX = CONSTANTS["error_suffix"]
ERROR_PREFIX = 'Something went wrong: '
ERROR_SUFFIX = ' Please conatct <a href="mailto:biosamples@geomar.de">biosamples@geomar.de</a> if you encounter this issue.'
BIS_URL = 'https://localhost:10443/Entity/'
logger = logging.getLogger("caosadvancedtools")
......@@ -75,6 +77,7 @@ def create_sample_entities(data):
if add_state:
sample.state = db.State(name="Registered", model="Sample life-cycle")
batch += [sample]
batch = post_process_samples(batch)
batch.insert()
return batch
......
#
# Copyright (C) 2025 Indiscale GmbH <info@indiscale.com>
# Copyright (C) 2025 Florian Spreckelsen <f.spreckelsen@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
import linkahead as db
def post_process_samples(samples: db.Container) -> db.Container:
"""Post process the container of samples to be registerd before
they are inserted. Dummy function to be overwritten.
"""
return samples
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment