Can not find data record in database.

More information about this error

Debug info: SELECT cm.*, m.name, md.name AS modname 
FROM {course_modules} cm
JOIN {modules} md ON md.id = cm.module
JOIN {lesson} m ON m.id = cm.instance

WHERE cm.id = :cmid AND md.name = :modulename

[array (
'cmid' => 431,
'modulename' => 'lesson',
)]
Error code: invalidrecordunknown
Stack trace: 
  • line 1483 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
  • line 1328 of /lib/datalib.php: call to moodle_database->get_record_sql()
  • line 38 of /mod/lesson/view.php: call to get_coursemodule_from_id()