fderyckel / ifitwala_ed

A school dedicated frappe app
http://demo.ifitwala.com
Other
21 stars 11 forks source link

Issue with Guardian and user creation #35

Open fderyckel opened 3 years ago

fderyckel commented 3 years ago

Traceback (most recent call last): File "/home/flipo/frappe-bench/apps/frappe/frappe/model/base_document.py", line 339, in db_insert frappe.db.sql("""INSERT INTO tab{doctype} ({columns}) File "/home/flipo/frappe-bench/apps/frappe/frappe/database/database.py", line 147, in sql self._cursor.execute(query, values) File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q) File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 517, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 732, in _read_query_result result.read() File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 1075, in read first_packet = self.connection._read_packet() File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/connections.py", line 684, in _read_packet packet.check_error() File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/home/flipo/frappe-bench/env/lib/python3.8/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.IntegrityError: (1062, "Duplicate entry 'Guardian Four Female' for key 'PRIMARY'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/flipo/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job method(**kwargs) File "/home/flipo/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 1071, in create_contact contact.insert(ignore_permissions=True, ignore_links=ignore_links, ignore_mandatory=ignore_mandatory) File "/home/flipo/frappe-bench/apps/frappe/frappe/model/document.py", line 253, in insert raise e File "/home/flipo/frappe-bench/apps/frappe/frappe/model/document.py", line 250, in insert self.db_insert() File "/home/flipo/frappe-bench/apps/frappe/frappe/model/base_document.py", line 357, in db_insert raise frappe.DuplicateEntryError(self.doctype, self.name, e) frappe.exceptions.DuplicateEntryError: ('Contact', 'Guardian Four Female', IntegrityError(1062, "Duplicate entry 'Guardian Four Female' for key 'PRIMARY'"))

fderyckel commented 3 years ago

With title: frappe.core.doctype.user.user.create_contact