Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ckanext-dgu
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MJU-POPS
ckanext-dgu
Merge requests
!12
Fix sop number error
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix sop number error
fix/sop-number-error
into
development
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Kristijan Čagran
requested to merge
fix/sop-number-error
into
development
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
83ca63a9
1 commit,
3 years ago
1 file
+
3
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ckanext/dgu/controllers/package.py
+
3
−
0
Options
# -*- 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
)
+
'"
}
'