Skip to content

Commit

Permalink
解决SQL工单提交人信息缺失的问题 fix #1881
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyo committed Sep 27, 2022
1 parent bb7144c commit c821122
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions sql_api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ def create(self, validated_data):
is_backup=is_backup,
is_manual=0,
syntax_type=check_result.syntax_type,
engineer=user.username,
engineer_display=user.display,
group_name=group.group_name,
audit_auth_groups=Audit.settings(
Expand Down
2 changes: 2 additions & 0 deletions sql_api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ def test_submit_workflow(self):
r = self.client.post("/api/v1/workflow/", json_data, format="json")
self.assertEqual(r.status_code, status.HTTP_201_CREATED)
self.assertEqual(r.json()["workflow"]["workflow_name"], "上线工单1")
self.assertEqual(r.json()["workflow"]["engineer"], self.user.username)
self.assertEqual(r.json()["workflow"]["engineer_display"], self.user.display)

def test_submit_param_is_None(self):
"""测试SQL提交,参数内容为空"""
Expand Down

0 comments on commit c821122

Please sign in to comment.