You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# dongtai-server-1 logs
[pid: 69|app: 0|req: 1948/2671] ipaddr () {38 vars in 574 bytes} [Thu Mar 23 17:53:54 2023] POST /api/v1/report/upload => generated 60 bytes in 32 msecs (HTTP/1.0 200) 10 headers in 380 bytes (1 switches on core 5)
ERROR 2023-03-23 17:54:02,627 [project_add.post:185] The database backend does not accept 0 as a value for AutoField.
Traceback (most recent call last):
File "/opt/dongtai/./dongtai_web/views/project_add.py", line 178, in post
project.save(update_fields=[
File "/usr/local/lib/python3.10/site-packages/django/db/models/base.py", line 739, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/local/lib/python3.10/site-packages/django/db/models/base.py", line 776, in save_base
updated = self._save_table(
File "/usr/local/lib/python3.10/site-packages/django/db/models/base.py", line 858, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/local/lib/python3.10/site-packages/django/db/models/base.py", line 912, in _do_update
return filtered._update(values) > 0
File "/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 802, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1162, in execute_sql
sql, params = self.as_sql()
File "/usr/local/lib/python3.10/site-packages/django/db/backends/mysql/compiler.py", line 44, in as_sql
update_query, update_params = super().as_sql()
File "/usr/local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1525, in as_sql
val = field.get_db_prep_save(val, connection=self.connection)
File "/usr/local/lib/python3.10/site-packages/django/db/models/fields/related.py", line 971, in get_db_prep_save
return self.target_field.get_db_prep_save(value, connection=connection)
File "/usr/local/lib/python3.10/site-packages/django/db/models/fields/__init__.py", line 842, in get_db_prep_save
return self.get_db_prep_value(value, connection=connection, prepared=False)
File "/usr/local/lib/python3.10/site-packages/django/db/models/fields/__init__.py", line 2487, in get_db_prep_value
value = connection.ops.validate_autopk_value(value)
File "/usr/local/lib/python3.10/site-packages/django/db/backends/mysql/operations.py", line 236, in validate_autopk_value
raise ValueError('The database backend does not accept 0 as a '
ValueError: The database backend does not accept 0 as a value for AutoField.
[pid: 69|app: 0|req: 1949/2672] ipaddr () {42 vars in 909 bytes} [Thu Mar 23 17:54:02 2023] POST /api/v1/project/add => generated 50 bytes in 231 msecs (HTTP/1.0 200) 11 headers in 428 bytes (1 switches on core 7)
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Version
1.9.3
Installation Type
Official Docker Compose
Service Name
DongTai-Web
Describe the details of the bug and the steps to reproduce it
Additional Information
No response
Logs
The text was updated successfully, but these errors were encountered: