mirror of https://github.com/jumpserver/jumpserver
Merge branch 'dev' of github.com:jumpserver/jumpserver into dev
commit
e23bfa0f69
|
@ -34,7 +34,7 @@ class SystemUserSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
|
|||
'priority', 'username_same_with_user',
|
||||
'auto_push', 'cmd_filters', 'sudo', 'shell', 'comment',
|
||||
'auto_generate_key', 'sftp_root',
|
||||
'assets_amount',
|
||||
'assets_amount', 'date_created', 'created_by'
|
||||
]
|
||||
extra_kwargs = {
|
||||
'password': {"write_only": True},
|
||||
|
|
|
@ -58,6 +58,12 @@ class JMSCSVParser(BaseParser):
|
|||
col = col.replace("“", '"').replace("”", '"').\
|
||||
replace("‘", '"').replace('’', '"').replace("'", '"')
|
||||
col = json.loads(col)
|
||||
# 字典转换
|
||||
if isinstance(col, str) and col.find("{") != -1 and col.find("}") != -1:
|
||||
# 替换中文格式引号
|
||||
col = col.replace("“", '"').replace("”", '"'). \
|
||||
replace("‘", '"').replace('’', '"').replace("'", '"')
|
||||
col = json.loads(col)
|
||||
_row.append(col)
|
||||
return _row
|
||||
|
||||
|
@ -68,7 +74,7 @@ class JMSCSVParser(BaseParser):
|
|||
"""
|
||||
_row_data = {}
|
||||
for k, v in row_data.items():
|
||||
if isinstance(v, list) \
|
||||
if isinstance(v, list) or isinstance(v, dict)\
|
||||
or isinstance(v, str) and k.strip() and v.strip():
|
||||
_row_data[k] = v
|
||||
return _row_data
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -13,7 +13,7 @@ class TicketSerializer(serializers.ModelSerializer):
|
|||
model = models.Ticket
|
||||
fields = [
|
||||
'id', 'user', 'user_display', 'title', 'body',
|
||||
'assignees', 'assignees_display',
|
||||
'assignees', 'assignees_display', 'assignee', 'assignee_display',
|
||||
'status', 'action', 'date_created', 'date_updated',
|
||||
'type', 'type_display', 'action_display',
|
||||
]
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="verify">
|
||||
<p style="margin: 20px auto;">
|
||||
<strong style="color: #000000">
|
||||
{% trans 'Download and install the Google Authenticator application on your phone' %}
|
||||
{% trans 'Download and install the Google Authenticator application on your phone or applet of WeChat' %}
|
||||
</strong>
|
||||
</p>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue