Skip to content

Commit

Permalink
Fixed header row detection (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
roll authored Nov 28, 2024
1 parent ef80e62 commit 77c5965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/endpoints/file/index.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from fastapi import Request
from frictionless import FrictionlessException, Resource
from frictionless import Dialect, FrictionlessException, Resource
from pydantic import BaseModel

from ... import helpers, models, types
Expand Down Expand Up @@ -51,7 +51,7 @@ def action(project: Project, props: Props) -> Result:
path, basepath = fs.get_path_and_basepath(props.path)
name = helpers.name_record(project, path=path)
resource_obj = (
Resource(path=path, basepath=basepath)
Resource(path=path, basepath=basepath, dialect=Dialect(header_rows=[1]))
if missing_record
else Resource.from_descriptor(
record.resource,
Expand Down

0 comments on commit 77c5965

Please sign in to comment.