Merge pull request #18697 from phot0n/custom-module-def-ux

fix: make module def custom checkbox readonly in prod mode
This commit is contained in:
Ritwik Puri 2022-11-01 12:50:07 +05:30 committed by GitHub
commit c76c02f43d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,5 +9,12 @@ frappe.ui.form.on("Module Def", {
frm.set_value("app_name", "frappe");
}
});
if (!frappe.boot.developer_mode) {
frm.set_df_property("custom", "read_only", 1);
if (frm.is_new()) {
frm.set_value("custom", 1);
}
}
},
});