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
d998e2a5
Commit
d998e2a5
authored
2 years ago
by
Thorge Petersen
Browse files
Options
Downloads
Patches
Plain Diff
Added some debug log messages
parent
0c687ca9
Branches
Branches containing commit
Tags
2.5.2
Tags containing commit
2 merge requests
!41
Version 2.0.0
,
!38
Merge py3 into dev
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ckanext/odsh/logic/action.py
+1
-0
1 addition, 0 deletions
ckanext/odsh/logic/action.py
ckanext/odsh/validation.py
+4
-0
4 additions, 0 deletions
ckanext/odsh/validation.py
with
5 additions
and
0 deletions
ckanext/odsh/logic/action.py
+
1
−
0
View file @
d998e2a5
...
@@ -22,6 +22,7 @@ from ckanext.odsh.helpers import odsh_extract_value_from_extras
...
@@ -22,6 +22,7 @@ from ckanext.odsh.helpers import odsh_extract_value_from_extras
def
odsh_package_create
(
context
,
data_dict
):
def
odsh_package_create
(
context
,
data_dict
):
log
.
debug
(
"
odsh_package_create
"
)
pkg_type
=
data_dict
.
get
(
'
type
'
,
None
)
pkg_type
=
data_dict
.
get
(
'
type
'
,
None
)
if
pkg_type
==
'
collection
'
:
if
pkg_type
==
'
collection
'
:
return
package_create
(
context
,
data_dict
)
return
package_create
(
context
,
data_dict
)
...
...
This diff is collapsed.
Click to expand it.
ckanext/odsh/validation.py
+
4
−
0
View file @
d998e2a5
...
@@ -31,6 +31,7 @@ def _extract_value(data, field):
...
@@ -31,6 +31,7 @@ def _extract_value(data, field):
def
validate_extra_groups
(
data
,
requireAtLeastOne
,
errors
):
def
validate_extra_groups
(
data
,
requireAtLeastOne
,
errors
):
log
.
debug
(
"
Validating extra_groups
"
)
value
=
_extract_value
(
data
,
'
groups
'
)
value
=
_extract_value
(
data
,
'
groups
'
)
error_message_no_group
=
'
at least one group needed
'
error_message_no_group
=
'
at least one group needed
'
if
value
!=
None
:
if
value
!=
None
:
...
@@ -62,6 +63,7 @@ def validate_extra_groups(data, requireAtLeastOne, errors):
...
@@ -62,6 +63,7 @@ def validate_extra_groups(data, requireAtLeastOne, errors):
def
validate_extras
(
key
,
data
,
errors
,
context
):
def
validate_extras
(
key
,
data
,
errors
,
context
):
log
.
debug
(
"
Validating extras
"
)
extra_errors
=
{}
extra_errors
=
{}
isStaNord
=
(
'
id
'
,)
in
data
and
data
[(
'
id
'
,)][:
7
]
==
'
StaNord
'
isStaNord
=
(
'
id
'
,)
in
data
and
data
[(
'
id
'
,)][:
7
]
==
'
StaNord
'
...
@@ -128,6 +130,7 @@ def _set_value(data, field, value):
...
@@ -128,6 +130,7 @@ def _set_value(data, field, value):
def
validate_extra_date_new
(
key
,
field
,
data
,
optional
,
errors
):
def
validate_extra_date_new
(
key
,
field
,
data
,
optional
,
errors
):
log
.
debug
(
"
Validating extra_date_new
"
)
value
=
_extract_value
(
data
,
field
)
value
=
_extract_value
(
data
,
field
)
if
not
value
:
if
not
value
:
...
@@ -146,6 +149,7 @@ def validate_extra_date_new(key, field, data, optional, errors):
...
@@ -146,6 +149,7 @@ def validate_extra_date_new(key, field, data, optional, errors):
def
validate_licenseAttributionByText
(
key
,
data
,
errors
,
context
):
def
validate_licenseAttributionByText
(
key
,
data
,
errors
,
context
):
log
.
debug
(
"
Validating licenseAttributionByText
"
)
register
=
model
.
Package
.
get_license_register
()
register
=
model
.
Package
.
get_license_register
()
isByLicense
=
False
isByLicense
=
False
for
k
in
data
:
for
k
in
data
:
...
...
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