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
82bdbbad
Commit
82bdbbad
authored
6 years ago
by
anonymous
Browse files
Options
Downloads
Patches
Plain Diff
Remove debugging code
parent
8e978caa
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ckanext/odsh/validation.py
+2
-10
2 additions, 10 deletions
ckanext/odsh/validation.py
with
2 additions
and
10 deletions
ckanext/odsh/validation.py
+
2
−
10
View file @
82bdbbad
...
@@ -88,8 +88,6 @@ def validate_extra_date_new(key, field, data, optional, errors):
...
@@ -88,8 +88,6 @@ def validate_extra_date_new(key, field, data, optional, errors):
else
:
else
:
if
re
.
match
(
r
'
\d\d\d\d-\d\d-\d\d
'
,
value
):
if
re
.
match
(
r
'
\d\d\d\d-\d\d-\d\d
'
,
value
):
try
:
try
:
print
(
'
parse
'
)
print
(
value
)
dt
=
parse
(
value
)
dt
=
parse
(
value
)
_set_value
(
data
,
field
,
dt
.
isoformat
())
_set_value
(
data
,
field
,
dt
.
isoformat
())
return
return
...
@@ -122,7 +120,6 @@ def validate_extra_date_factory(field, optional=False):
...
@@ -122,7 +120,6 @@ def validate_extra_date_factory(field, optional=False):
return
lambda
key
,
data
,
errors
,
context
:
validate_extra_date
(
key
,
field
,
data
,
optional
)
return
lambda
key
,
data
,
errors
,
context
:
validate_extra_date
(
key
,
field
,
data
,
optional
)
def
validate_licenseAttributionByText
(
key
,
data
,
errors
,
context
):
def
validate_licenseAttributionByText
(
key
,
data
,
errors
,
context
):
log
.
error
(
"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
)
register
=
model
.
Package
.
get_license_register
()
register
=
model
.
Package
.
get_license_register
()
isByLicense
=
False
isByLicense
=
False
for
k
in
data
:
for
k
in
data
:
...
@@ -133,7 +130,6 @@ def validate_licenseAttributionByText(key, data, errors,context):
...
@@ -133,7 +130,6 @@ def validate_licenseAttributionByText(key, data, errors,context):
hasAttribution
=
False
hasAttribution
=
False
for
k
in
data
:
for
k
in
data
:
if
data
[
k
]
==
'
licenseAttributionByText
'
:
if
data
[
k
]
==
'
licenseAttributionByText
'
:
print
(
data
[
k
])
if
isinstance
(
data
[(
k
[
0
],
k
[
1
],
'
value
'
)],
Missing
)
or
(
k
[
0
],
k
[
1
],
'
value
'
)
not
in
data
:
if
isinstance
(
data
[(
k
[
0
],
k
[
1
],
'
value
'
)],
Missing
)
or
(
k
[
0
],
k
[
1
],
'
value
'
)
not
in
data
:
del
data
[(
k
[
0
],
k
[
1
],
'
value
'
)]
del
data
[(
k
[
0
],
k
[
1
],
'
value
'
)]
del
data
[(
k
[
0
],
k
[
1
],
'
key
'
)]
del
data
[(
k
[
0
],
k
[
1
],
'
key
'
)]
...
@@ -226,10 +222,6 @@ def tag_string_convert(key, data, errors, context):
...
@@ -226,10 +222,6 @@ def tag_string_convert(key, data, errors, context):
current_index
=
max
([
int
(
k
[
1
])
for
k
in
data
.
keys
()
current_index
=
max
([
int
(
k
[
1
])
for
k
in
data
.
keys
()
if
len
(
k
)
==
3
and
k
[
0
]
==
'
tags
'
]
+
[
-
1
])
if
len
(
k
)
==
3
and
k
[
0
]
==
'
tags
'
]
+
[
-
1
])
print
(
'
TAGS
'
)
print
(
current_index
)
for
num
,
tag
in
zip
(
count
(
current_index
+
1
),
tags
):
for
num
,
tag
in
zip
(
count
(
current_index
+
1
),
tags
):
data
[(
'
tags
'
,
num
,
'
name
'
)]
=
tag
data
[(
'
tags
'
,
num
,
'
name
'
)]
=
tag
...
...
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