Skip to content

Commit

Permalink
better variable names in helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Manoj-nathwani committed May 7, 2021
1 parent 89255d9 commit 0618682
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckanext/scheming/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,27 @@ def get_missing_resources(pkg, schema):


@helper
def get_core_resources(pkg):
def get_core_resources(dataset):
"""
Using the dataset, return a list of it's resources which have
a resource_type set
"""
return [
resource
for resource in pkg.get('resources', [])
for resource in dataset.get('resources', [])
if resource['resource_type']
]


@helper
def get_extra_resources(pkg):
def get_extra_resources(dataset):
"""
Using the dataset, return a list of it's resources which do not
have a resource_type set
"""
return [
resource
for resource in pkg.get('resources', [])
for resource in dataset.get('resources', [])
if not resource['resource_type']
]

Expand Down

0 comments on commit 0618682

Please sign in to comment.