Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing client pass-through for Dataset.get_or_create_by_full_path #339

Merged
merged 3 commits into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion solvebio/resource/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ def get_or_create_by_full_path(cls, full_path, **kwargs):
kwargs['assert_type'] = 'dataset'
# Create this is a dataset (for the "create" in get_or_create)
kwargs['object_type'] = 'dataset'
obj = Object.get_or_create_by_full_path(full_path, **kwargs)

_client = kwargs.pop('client', None) or cls._client or client
obj = Object.get_or_create_by_full_path(
full_path, client=_client, **kwargs)

return cls.retrieve(obj.dataset_id)

def saved_queries(self, **params):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ filename = *.py
; proper indentation would make it line up with the next ident which is
; E125
ignore = E127,E402,N801,N802,E722,W504
max-line-length = 120

[tox]
envlist = py27, py34, py37, pypy
Expand Down