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()