fix hooks
This commit is contained in:
parent
33966decd9
commit
bd487adca2
@ -215,6 +215,13 @@ doc_events = {
|
||||
}
|
||||
}
|
||||
|
||||
# custom_ui/hooks.py (or a separate utils.py in the app)
|
||||
def remove_fencing_job_queue_links(doc):
|
||||
"""Remove links to the deleted 'Fencing Job Queue' doctype"""
|
||||
links = doc.get("links", [])
|
||||
doc["links"] = [l for l in links if l.get("link_doctype") != "Fencing Job Queue"]
|
||||
|
||||
|
||||
fixtures = [
|
||||
# {"dt": "Company"},
|
||||
# {"dt": "Account"},
|
||||
@ -233,10 +240,7 @@ fixtures = [
|
||||
["custom", "=", 1],
|
||||
["name", "!=", "Fencing Job Queue"],
|
||||
["name", "!=", "Locate Log"], # <-- skip the deleted/removed doctype
|
||||
],
|
||||
"postprocess": lambda doc: doc.update(
|
||||
{"links": [l for l in doc.get("links", []) if l.get("link_doctype") != "Fencing Job Queue"]}
|
||||
)
|
||||
]
|
||||
},
|
||||
{ "dt": "Task Type" },
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user