Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
33da9fd1
Commit
33da9fd1
authored
Dec 29, 2015
by
wangyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix hostname unicode
parent
c5f9db45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
views.py
jasset/views.py
+1
-1
No files found.
jasset/views.py
View file @
33da9fd1
...
...
@@ -138,7 +138,7 @@ def asset_add(request):
is_active
=
True
if
request
.
POST
.
get
(
'is_active'
)
==
'1'
else
False
use_default_auth
=
request
.
POST
.
get
(
'use_default_auth'
,
''
)
try
:
if
Asset
.
objects
.
filter
(
hostname
=
str
(
hostname
)):
if
Asset
.
objects
.
filter
(
hostname
=
unicode
(
hostname
)):
error
=
u'该主机名
%
s 已存在!'
%
hostname
raise
ServerError
(
error
)
...
...
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