Skip to content

However, it was saved twice in the database. #2051

@guoqingshuai

Description

@guoqingshuai

2025-03-29 17:55:48][django.get_request_header_dic():31] [INFO] ************
[2025-03-29 17:55:48][django.get_request_header_dic():36] [INFO] {'token': 'd2f1b1d1a5f94142888b08fcead6d80e'}
[2025-03-29 17:55:48][django.effective_token():186] [INFO] <diff: 228781.0>
[2025-03-29 17:55:48][django.after_init_instance():140] [INFO] password_hash=54b05ca096b9669cff6f5ce29655d7c4
[2025-03-29 17:55:48][django.after_init_instance():149] [INFO] password_hash=a8ac11f5cb3f1e72614c8481889b4aa8
Rows:

errors: []
validation_error: None
diff: ['2024', '1820222322@qq.com', '123', '模版', '17600602986', '北京', 'c15860aefa154e11a66a9306b93f8710', '75a6a80a990a4162b526c89ece8863a4', '3']
import_type: new
row_values: {}
object_id: c15860aefa154e11a66a9306b93f8710
object_repr: UserInfo object (c15860aefa154e11a66a9306b93f8710)
instance: None
original: None
Invalid Rows: []

Error Rows: []

Failed Dataset: 学生学号 邮箱 密码 学生姓名 手机号 家庭地址 父id 用户id 用户状态 Error

new: 1
update: 0
delete: 0
skip: 0
error: 0
invalid: 0




[2025-03-29 17:55:48][django.after_init_instance():140] [INFO] password_hash=69853af29fe6c83c8f12149311ae4d39
[2025-03-29 17:55:48][django.after_init_instance():149] [INFO] password_hash=cf630b7dad680e56827a97e81ab8b837
[2025-03-29 17:55:48][django.zj_drf_response():85] [INFO] fdae00fe-0c83-11f0-be8d-f22d1eec0caf
[2025-03-29 17:55:48][django.zj_drf_response():87] [INFO] fdae00fe-0c83-11f0-be8d-f22d1eec0caf
[2025-03-29 17:55:48][django.zj_drf_response():91] [INFO] <Response body: {'total_rows': 1, 'totals': OrderedDict([('new', 1), ('update', 0), ('delete', 0), ('skip', 0), ('error', 0), ('invalid', 0)]), 'base_errors': []}>
[2025-03-29 17:55:48][django.server.log_message():212] [INFO] "POST /api/users/student/updata_file/ HTTP/1.1" 200 180
[2025-03-29 17:55:51][django.get_request_header_dic():31] [INFO] ************
[2025-03-29 17:55:51][django.get_request_header_dic():36] [INFO] {'token': 'd2f1b1d1a5f94142888b08fcead6d80e'}
[2025-03-29 17:55:51][django.effective_token():186] [INFO] <diff: 228784.0>
[2025-03-29 17:55:51][django.after_init_instance():152] [INFO] 更新实例
Rows:

errors: []
validation_error: None
diff: ['2024', '1820222322@qq.com', '123', '模版', '17600602986', '北京', '0d1a82160c9e496f9c0f6cba777b35419907fe891404b53bf6316b89e7651fb', '75a6a80a990a4162b526c89ece8863a4', '3']
import_type: update
row_values: {}
object_id: 19907fe891404b53bf6316b89e7651fb
object_repr: UserInfo object (19907fe891404b53bf6316b89e7651fb)
instance: None
original: UserInfo object (0d1a82160c9e496f9c0f6cba777b354b)
Invalid Rows: []

Error Rows: []

Failed Dataset: 学生学号 邮箱 密码 学生姓名 手机号 家庭地址 父id 用户id 用户状态 Error

new: 0
update: 1
delete: 0
skip: 0
error: 0
invalid: 0




[2025-03-29 17:55:51][django.after_init_instance():152] [INFO] 更新实例
[2025-03-29 17:55:51][django.zj_drf_response():85] [INFO] ff6858a4-0c83-11f0-be8d-f22d1eec0caf
[2025-03-29 17:55:51][django.zj_drf_response():87] [INFO] ff6858a4-0c83-11f0-be8d-f22d1eec0caf
[2025-03-29 17:55:51][django.zj_drf_response():91] [INFO] <Response body: {'total_rows': 1, 'totals': OrderedDict([('new', 0), ('update', 1), ('delete', 0), ('skip', 0), ('error', 0), ('invalid', 0)]), 'base_errors': []}>
[2025-03-29 17:55:51][django.server.log_message():212] [INFO] "POST /api/users/student/updata_file/ HTTP/1.1" 200 180
[2025-03-29 17:55:54][django.get_request_header_dic():31] [INFO] ************
[2025-03-29 17:55:54][django.get_request_header_dic():36] [INFO] {'token': 'd2f1b1d1a5f94142888b08fcead6d80e'}
[2025-03-29 17:55:54][django.effective_token():186] [INFO] <diff: 228787.0>
[2025-03-29 17:55:54][django.exception_handler():56] [ERROR] 1: get() returned more than one UserInfo -- it returned 2! (OrderedDict([('学生学号', 2024), ('邮箱', '1820222322@qq.com'), ('密码', 123), ('学生姓名', '模版'), ('手机号', 17600602986), ('家庭地址', '北京'), ('父id', '75a6a80a990a4162b526c89ece8863a4'), ('用户id', '1a7a7bf1f3af459f91f38868c131dda3'), ('用户状态', 3)]))
[2025-03-29 17:55:54][django.exception_handler():57] [ERROR] {'view': <users.views.StudentViewSet object at 0x7fb6ac8820a0>, 'args': (), 'kwargs': {}, 'request': <rest_framework.request.Request: POST '/api/users/student/updata_file/'>}
[2025-03-29 17:55:54][django.exception_handler():125] [ERROR] 1
[2025-03-29 17:55:54][django.exception_handler():126] [ERROR] True
[2025-03-29 17:55:54][django.exception_handler():127] [ERROR] OrderedDict([('学生学号', 2024), ('邮箱', '1820222322@qq.com'), ('密码', 123), ('学生姓名', '模版'), ('手机号', 17600602986), ('家庭地址', '北京'), ('父id', '75a6a80a990a4162b526c89ece8863a4'), ('用户id', '1a7a7bf1f3af459f91f38868c131dda3'), ('用户状态', 3)])
[2025-03-29 17:55:54][django.exception_handler():130] [ERROR] {'status': 200, 'errorCode': 'zhijian.api.other_errors', 'errorMessageCh': 'other_errors', 'errorMessage': '内部错误'}
[2025-03-29 17:55:54][django.exception_handler():135] [INFO] <Response status_code=200, "text/html; charset=utf-8">
[2025-03-29 17:55:54][django.exception_handler():136] [INFO] <Response body: {'success': False, 'errorCode': 'zhijian.api.other_errors', 'info': ('get() returned more than one UserInfo -- it returned 2!',), 'detailedInfo': OrderedDict([('学生学号', 2024), ('邮箱', '1820222322@qq.com'), ('密码', 123), ('学生姓名', '模版'), ('手机号', 17600602986), ('家庭地址', '北京'), ('父id', '75a6a80a990a4162b526c89ece8863a4'), ('用户id', '1a7a7bf1f3af459f91f38868c131dda3'), ('用户状态', 3)]), 'errorMessage': '内部错误', 'errorMessageCh': 'other_errors', 'requestId': UUID('017c131a-0c84-11f0-be8d-f22d1eec0caf')}>
[2025-03-29 17:55:54][django.server.log_message():212] [INFO] "POST /api/users/student/updata_file/ HTTP/1.1" 200 493

提示是升级 但是 数据库中保存了两次, 使用版本是4.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions