Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
ckanext-odsh
Commits
ec365663
Commit
ec365663
authored
1 year ago
by
Thorge Petersen
Browse files
Options
Downloads
Patches
Plain Diff
Removed typing in odsh_has_more_facets
parent
ed80c273
No related branches found
No related tags found
1 merge request
!50
Upgraded to CKAN 2.10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ckanext/odsh/helpers.py
+1
-8
1 addition, 8 deletions
ckanext/odsh/helpers.py
with
1 addition
and
8 deletions
ckanext/odsh/helpers.py
+
1
−
8
View file @
ec365663
...
...
@@ -16,15 +16,11 @@ import urllib.error
import
hashlib
import
re
import
csv
import
urllib.request
import
urllib.error
import
urllib.parse
from
ckan.common
import
config
,
request
,
g
,
c
from
urllib.parse
import
urlsplit
,
urlunsplit
import
ckan.lib.helpers
as
helpers
from
collections
import
OrderedDict
import
pkg_resources
from
typing
import
Any
,
Optional
CKAN_TYPES
=
{
'
http://dcat-ap.de/def/datasetTypes/collection
'
:
'
collection
'
}
...
...
@@ -248,10 +244,7 @@ def presorted_license_options(existing_license_id=None):
for
license_id
in
license_ids
]
def
odsh_has_more_facets
(
facet
:
str
,
search_facets
:
dict
[
str
,
dict
[
str
,
Any
]],
limit
:
Optional
[
int
]
=
None
,
exclude_active
:
bool
=
False
)
->
bool
:
def
odsh_has_more_facets
(
facet
,
search_facets
,
limit
=
None
,
exclude_active
=
False
):
facets
=
[]
for
facet_item
in
search_facets
.
get
(
facet
)[
'
items
'
]:
if
not
len
(
facet_item
[
'
name
'
].
strip
())
or
facet_item
[
'
count
'
]
==
0
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment