From 482100f4cc1e1cdba9dfa1fd2c2c7ac019a18906 Mon Sep 17 00:00:00 2001 From: Christian Oertlin Date: Thu, 12 Dec 2024 15:17:21 +0100 Subject: [PATCH] fix --- genotype_api/database/crud/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genotype_api/database/crud/create.py b/genotype_api/database/crud/create.py index 34188b5..c5ce716 100644 --- a/genotype_api/database/crud/create.py +++ b/genotype_api/database/crud/create.py @@ -29,7 +29,7 @@ async def create_sample(self, sample: Sample) -> Sample: """Creates a sample in the database.""" sample_query: Query = select(Analysis).filter(Sample.id == sample.id) sample_in_db = await self.fetch_one_or_none(sample_query) - if await sample_in_db: + if sample_in_db: raise SampleExistsError self.session.add(sample) await self.session.commit()