fix: Remove blocking dataset id check
This commit is contained in:
parent
ad462d8510
commit
9e473996d3
1 changed files with 0 additions and 8 deletions
|
|
@ -31,14 +31,6 @@ def get_add_router() -> APIRouter:
|
||||||
if not datasetId and not datasetName:
|
if not datasetId and not datasetName:
|
||||||
raise ValueError("Either datasetId or datasetName must be provided.")
|
raise ValueError("Either datasetId or datasetName must be provided.")
|
||||||
|
|
||||||
if datasetId:
|
|
||||||
dataset = await get_dataset(user_id=user.id, dataset_id=datasetId)
|
|
||||||
try:
|
|
||||||
# Test accessing id value to see if dataset object exists
|
|
||||||
dataset_id = dataset.id # noqa: F841
|
|
||||||
except IndexError:
|
|
||||||
raise ValueError("No dataset found with the provided datasetName.")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if isinstance(data, str) and data.startswith("http"):
|
if isinstance(data, str) and data.startswith("http"):
|
||||||
if "github" in data:
|
if "github" in data:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue