[INSERT INTO `ost_attachment` SET `file_id` = 1733, `type` = 'D', `object_id` = 8222, `name` = 'screenshot-BdLc'] Duplicate entry '8222-1733-D' for key 'file-type'

---- Backtrace ----
#0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1062', '[INSERT INTO `o...')
#1 (root)/include/class.orm.php(3133): db_query('INSERT INTO `os...', true, true)
#2 (root)/include/class.orm.php(597): MySqlExecutor->execute()
#3 (root)/include/class.attachment.php(161): VerySimpleModel->save()
#4 (root)/include/ajax.draft.php(101): GenericAttachments->upload(Array)
#5 (root)/include/ajax.draft.php(300): DraftAjaxAPI->_uploadInlineImage(Object(Draft))
#6 [internal function]: DraftAjaxAPI->uploadInlineImage('8222')
#7 (root)/include/class.dispatcher.php(145): call_user_func_array(Array, Array)
#8 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('8222/attach', Array)
#9 (root)/include/class.dispatcher.php(120): Dispatcher->resolve('8222/attach', Array)
#10 (root)/include/class.dispatcher.php(38): UrlMatcher->dispatch('/draft/8222/att...', NULL)
#11 (root)/scp/ajax.php(262): Dispatcher->resolve('/draft/8222/att...')
#12 {main}