Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-dgu
Commits
83ca63a9
Commit
83ca63a9
authored
Dec 15, 2021
by
Kristijan Čagran
Browse files
Fix sop number error
parent
8b097675
Changes
1
Hide whitespace changes
Inline
Side-by-side
ckanext/dgu/controllers/package.py
View file @
83ca63a9
# -*- encoding: utf-8 -*-
import
exceptions
import
re
import
urllib2
from
urllib
import
urlencode
...
...
@@ -266,6 +267,8 @@ class PackageController(ckan.controllers.package.PackageController):
if
title
.
find
(
'
\n
'
)
>
0
:
title
=
title
[
0
:
title
.
find
(
'
\n
'
)].
strip
()
return
'{"name": "'
+
title
+
'" , "url": "'
+
(
PISRS_URL
+
id
)
+
'"}'
except
exceptions
.
UnicodeError
:
return
'{"name": "Vnos ni v pravilnem formatu." , "url":""}'
except
URLError
:
return
'{"name": "Napaka pri poizvedbi SOP" , "url":'
+
(
PISRS_URL
+
id
)
+
'"}'
return
'{"name": "Predpis s tem SOP ni bil najden" , "url": "'
+
(
PISRS_URL
+
id
)
+
'"}'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment