From 588df3c9a4204c5312d48c627bac9cea29906732 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Wed, 18 Sep 2024 09:58:54 -0400 Subject: [PATCH] Few updates in endpoints --- pephub/routers/api/v1/namespace.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pephub/routers/api/v1/namespace.py b/pephub/routers/api/v1/namespace.py index 00386cfe..f6a489ae 100644 --- a/pephub/routers/api/v1/namespace.py +++ b/pephub/routers/api/v1/namespace.py @@ -182,7 +182,6 @@ async def create_pep( p = Project(f"{dirpath}/{init_file.filename}") p.name = name p.description = description - p.pep_schema = pep_schema try: agent.project.create( p, @@ -191,7 +190,7 @@ async def create_pep( tag=tag, description=description, is_private=is_private, - pep_schema=pep_schema, + pep_schema=pep_schema or "databio/pep-2.1.0", ) except ProjectUniqueNameError: raise HTTPException( @@ -235,7 +234,7 @@ async def upload_raw_pep( is_private = project_from_json.is_private tag = project_from_json.tag overwrite = project_from_json.overwrite - pep_schema = project_from_json.pep_schema + pep_schema = project_from_json.pep_schema or "databio/pep-2.1.0" pop = project_from_json.pop or False if hasattr(project_from_json, NAME_KEY): if project_from_json.name: