Skip to content

Commit

Permalink
Merge pull request #900 from DalgoT4D/898-ui4t-model-deletion-is-inco…
Browse files Browse the repository at this point in the history
…mplete

project dir should be a full path
  • Loading branch information
fatchat authored Nov 25, 2024
2 parents 0f5beb7 + fe596cb commit 3a107fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ddpui/core/dbtautomation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def sync_sources_in_schema(
sources_file_path = sync_sources(
config={"source_schema": schema_name, "source_name": source_name},
warehouse=warehouse_client,
dbtproject=dbtProject(Path(os.getenv("CLIENTDBT_ROOT")) / org.slug / "dbtrepo"),
dbtproject=dbtProject(Path(DbtProjectManager.get_dbt_project_dir(org.dbt))),
)

return str(sources_file_path), None
Expand Down Expand Up @@ -256,7 +256,7 @@ def get_output_cols_for_operation(org_warehouse: OrgWarehouse, op_type: str, con

def delete_dbt_model_in_project(orgdbt_model: OrgDbtModel):
"""Delete a dbt model in the project"""
dbt_project = dbtProject(Path(orgdbt_model.orgdbt.project_dir) / "dbtrepo")
dbt_project = dbtProject(Path(DbtProjectManager.get_dbt_project_dir(orgdbt_model.orgdbt)))
dbt_project.delete_model(orgdbt_model.sql_path)
return True

Expand Down

0 comments on commit 3a107fb

Please sign in to comment.