-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
3.0
-
None
-
MOODLE_30_STABLE
It is possible to create domoscio instance with invalid empty/null data (e.g. when creating in an empty course or when there is a problem with API call), leading to a fatal SQL exception
Debug info: ERROR: null value in column "kgraphid" violates not-null constraint
|
DETAIL: Failing row contains (1, null, 5).
|
INSERT INTO mdl_domoscio_knowledge_graphs (courseid,kgraphid) VALUES($1,$2) RETURNING id
|
[array (
|
'courseid' => '5',
|
'kgraphid' => NULL,
|
)]
|
Error code: dmlwriteexception
|
Stack trace:
|
|
line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
|
line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
|
line 868 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
|
line 924 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
|
line 98 of /mod/domoscio/lib.php: call to pgsql_native_moodle_database->insert_record()
|
line 121 of /course/modlib.php: call to domoscio_add_instance()
|
line 275 of /course/modedit.php: call to add_moduleinfo()
|
It should better validate / deal with the error like this.
- duplicates
-
CONTRIB-5952 Fatal error on PostgreSQL
-
- Open
-