Not able to cancel or delete Interview Feedback

Hello,

I am not able to delete Interview Feedback for a user, (it is not linked with anything else)

App Versions

{
	"erpnext": "14.63.3",
	"frappe": "14.66.2",
	"hrms": "14.22.0"
}

Route

Form/Interview Feedback/HR-INT-FEED-0001

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1603, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 50, in cancel
    doc.cancel()
  File "apps/frappe/frappe/model/document.py", line 1007, in cancel
    return self._cancel()
  File "apps/frappe/frappe/model/document.py", line 989, in _cancel
    return self.save()
  File "apps/frappe/frappe/model/document.py", line 305, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 357, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1087, in run_post_save_methods
    self.run_method("on_cancel")
  File "apps/frappe/frappe/model/document.py", line 915, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1267, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1249, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 912, in fn
    return method_object(*args, **kwargs)
  File "apps/hrms/hrms/hr/doctype/interview_feedback/interview_feedback.py", line 22, in on_cancel
    self.update_interview_details()
  File "apps/hrms/hrms/hr/doctype/interview_feedback/interview_feedback.py", line 73, in update_interview_details
    if entry.interview_feedback == self.name:
AttributeError: 'InterviewDetail' object has no attribute 'interview_feedback'

Request Data

{
	"type": "POST",
	"args": {
		"doctype": "Interview Feedback",
		"name": "HR-INT-FEED-0001"
	},
	"btn": {
		"jQuery360045677641190116861": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 2524,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.cancel"
}

Response Data

{
	"exception": "AttributeError: 'InterviewDetail' object has no attribute 'interview_feedback'"
}

Hi @harshvadhiya,

It’s worked properly. Please check it.

Thank You!

HI @NCP ,

Thank you for the reply…
but i’m still getting the error

have a look at this video

https://www.awesomescreenshot.com/video/25342791?key=972fd0b741e7bd6ebd734b0c7e5f2924

video is too short and can’t be understood.

Hi @NCP ,

Please see the below video for better understandings.

https://www.awesomescreenshot.com/video/25342994?key=945aea363a8839725d51648a298241f1

Please verify if the “Average Rating” field exists in the Feedback table.

Yes, it exists but it is hidden and read only.

In version 14, there is no feedback tab. The feedback tab is available in version 15. There may be some issue or customization that you added causing this problem. Please review all configurations and customizations again.

Thank You!

1 Like

Oh, Ok

Thank You.

Hi @NCP,

I just realised I have restored a backup of HRMS v16.0.0-dev (develop) to v14.22.0 (version-14)

but I forgot to remove the interview and interview feedback data, so is there any way I can delete that data from my HRMS version 14?

issue: not able to cancel or delete interview feedback

If you want to only interview and interview feedback to remove the data, you can do it using either the bench console or the bench mariadb.

Reference:

Thank You!

It resulted table doesn’t exists


MariaDB [erpnext]> TRUNCATE `tabInterviewDetail`;
ERROR 1146 (42S02): Table 'erpnext.tabInterviewDetail' doesn't exist
TRUNCATE `tabInterview Detail`;

and it’s a child’s table but try it.

apply it and check it.

the query ran successful but the record is still there.


MariaDB [erpnext]> TRUNCATE `tabInterview Detail`;
Query OK, 0 rows affected (0.012 sec)

because it’s a child’s table.

Already I said, if you want to delete interview and interview feedback data then apply it.

TRUNCATE `tabInterview Feedback`;
TRUNCATE `tabInterview`;

First remove the Interview Feedback and after then Interview.

Thank You!

1 Like

Hi @NCP,

Thank you so much for the solution. Really appreciate your efforts.

I’m improving myself day-by-day. It was nice working with you.