NameError: name 'cur_frm' is not defined

can anyone explain this error.I cant understand where the cur_frm issue is raised because i didnt use it in any file.The error message pops up on saving

Blockquote

### App Versions

{
“erpnext”: “14.0.0-dev”,
“frappe”: “14.0.0-dev”,
“growops”: “0.0.1”
}

### Route

Form/Crop cycle/e20cee6fcd

### Trackeback

Traceback (most recent call last):
File “apps/frappe/frappe/desk/form/save.py”, line 23, in savedocs
doc.save()
File “apps/frappe/frappe/model/document.py”, line 288, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 322, in _save
self.run_before_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1040, in run_before_save_methods
self.run_method(“validate”)
File “apps/frappe/frappe/model/document.py”, line 916, in run_method
run_server_script_for_doc_event(self, method)
File “apps/frappe/frappe/core/doctype/server_script/server_script_utils.py”, line 39, in run_server_script_for_doc_event
frappe.get_doc(“Server Script”, script_name).execute_doc(doc)
File “apps/frappe/frappe/core/doctype/server_script/server_script.py”, line 100, in execute_doc
safe_exec(self.script, _locals={“doc”: doc}, restrict_commit_rollback=True)
File “apps/frappe/frappe/utils/safe_exec.py”, line 69, in safe_exec
exec(compile_restricted(script), exec_globals, _locals) # pylint: disable=exec-used
File “”, line 1, in
NameError: name ‘cur_frm’ is not defined

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 69, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1551, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/desk/form/save.py”, line 23, in savedocs
doc.save()
File “apps/frappe/frappe/model/document.py”, line 288, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 322, in _save
self.run_before_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1040, in run_before_save_methods
self.run_method(“validate”)
File “apps/frappe/frappe/model/document.py”, line 916, in run_method
run_server_script_for_doc_event(self, method)
File “apps/frappe/frappe/core/doctype/server_script/server_script_utils.py”, line 39, in run_server_script_for_doc_event
frappe.get_doc(“Server Script”, script_name).execute_doc(doc)
File “apps/frappe/frappe/core/doctype/server_script/server_script.py”, line 100, in execute_doc
safe_exec(self.script, _locals={“doc”: doc}, restrict_commit_rollback=True)
File “apps/frappe/frappe/utils/safe_exec.py”, line 69, in safe_exec
exec(compile_restricted(script), exec_globals, _locals) # pylint: disable=exec-used
File “”, line 1, in
NameError: name ‘cur_frm’ is not defined

### Request Data

{
“type”: “POST”,
“args”: {
“doc”: “{“name”:“e20cee6fcd”,“owner”:“Administrator”,“creation”:“2022-06-10 12:02:00.764436”,“modified”:“2022-06-10 12:02:00.764436”,“modified_by”:“Administrator”,“docstatus”:0,“idx”:0,“crop”:“tomato”,“farm”:“vellpakkam”,“slots”:“4514592989”,“start_date”:“2003-02-19”,“preseeding”:0,“germination”:0,“growing_sapling”:0,“growing_crop”:0,“harvested”:0,“doctype”:“Crop cycle”,”__last_sync_on":“2022-07-04T10:10:41.709Z”,"__unsaved":1,“area”:“332”}",
“action”: “Save”
},
“btn”: {
“jQuery360065230751114490751”: {
“events”: {
“click”: [
{
“type”: “click”,
“origType”: “click”,
“guid”: 287,
“namespace”: “”
}
]
}
}
},
“freeze”: true,
“headers”: {},
“error_handlers”: {},
“url”: “/api/method/frappe.desk.form.save.savedocs”
}

### Response Data

{
“exception”: “NameError: name ‘cur_frm’ is not defined”
}
``