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

Fix metadata entity format #1629

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os

from carto.do_dataset import DODataset

from .....auth import Credentials, defaults
Expand Down Expand Up @@ -72,9 +70,9 @@ def _get_entity(self, entity, filters=None, use_slug=False):

def _fetch_entity_id(self, entity, filter_id):
if isinstance(filter_id, list):
return list(filter(None, [self._fetch_entity(os.path.join(entity, _id)) for _id in filter_id]))
return list(filter(None, [self._fetch_entity('{0}/{1}'.format(entity, _id)) for _id in filter_id]))
else:
return self._fetch_entity(os.path.join(entity, filter_id))
return self._fetch_entity('{0}/{1}'.format(entity, filter_id))

def _fetch_entity(self, entity, filters=None):
if self._do_dataset:
Expand Down