Skip to content

Bug when table.original_file_path is None #52

@moreaupascal56

Description

@moreaupascal56

Hello just a small bug found :)

in init.py:
Table.original_file_path can be None but line 129 the if clause:

 if table.original_file_path.startswith(path):

fails if table.original_file_path is None.

Error log:

  File "/Users/user/Library/Caches/pypoetry/virtualenvs/venv/lib/python3.8/site-packages/dbt_coverage/__init__.py", line 132, in filter_catalog
    if table.original_file_path.startswith(path):
AttributeError: 'NoneType' object has no attribute 'startswith'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions