Skip to content

Commit

Permalink
fixing target remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Aug 9, 2022
1 parent 1f48855 commit 032cb2b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion materializationengine/blueprints/client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_analysis_version_and_table(
return None, None
analysis_table = (
Session.query(AnalysisTable)
.filter(AnalysisTable.analysisversion_id == AnalysisVersion.id)
.filter(AnalysisTable.analysisversion_id == analysis_version.id)
.filter(AnalysisTable.table_name == table_name)
.first()
)
Expand Down
3 changes: 0 additions & 3 deletions materializationengine/blueprints/client/datastack.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def wrapper(*args, **kwargs):
# get args and kwargs as a dict
arguments = parse_args(f, *args, **kwargs)

target_table = arguments.get("table_name")
target_datastack = arguments.get("datastack_name")
target_version = arguments.get("version")
# save the original target datastack and version in kwargs
Expand Down Expand Up @@ -158,7 +157,6 @@ def wrapper(*args, **kwargs):
# remap datastack name to point to parent version

if kwargs.get("datastack_name"):
print("using kwargs route")
kwargs["datastack_name"] = parent_datastack
kwargs["version"] = parent_version
return f(*args, **kwargs)
Expand All @@ -167,7 +165,6 @@ def wrapper(*args, **kwargs):
args_list[0] = parent_datastack
args_list[1] = parent_version
new_args = tuple(args_list)
print("using non kwarg route")
return f(*new_args, **kwargs)

else:
Expand Down

0 comments on commit 032cb2b

Please sign in to comment.