fix: semgrep errors
This commit is contained in:
parent
84bff2e941
commit
734113d477
3 changed files with 3 additions and 6 deletions
|
|
@ -647,7 +647,6 @@ def create_desktop_icons_from_workspace():
|
|||
icon.parent_icon = None
|
||||
if not frappe.db.exists("Desktop Icon", [{"label": icon.label, "link_type": icon.link_type}]):
|
||||
icon.insert(ignore_if_duplicate=True)
|
||||
frappe.db.commit()
|
||||
|
||||
|
||||
def generate_color():
|
||||
|
|
@ -670,12 +669,9 @@ def create_desktop_icons_from_installed_apps():
|
|||
icon.icon_type = "App"
|
||||
icon.link = app_details[0]["route"]
|
||||
icon.logo_url = app_details[0]["logo"]
|
||||
print(icon.label)
|
||||
print(icon.icon_type)
|
||||
if not frappe.db.exists("Desktop Icon", [{"label": icon.label, "icon_type": icon.icon_type}]):
|
||||
icon.save()
|
||||
index += 1
|
||||
frappe.db.commit()
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
frappe.ui.form.on("Desktop Settings", {
|
||||
refresh(frm) {
|
||||
frm.add_custom_button("Visit Desktop", () => frappe.set_route("desktop"));
|
||||
frm.add_custom_button(__("Visit Desktop"), () => frappe.set_route("desktop"));
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -246,11 +246,12 @@ frappe.ui.form.ControlAutocomplete = class ControlAutoComplete extends frappe.ui
|
|||
}
|
||||
|
||||
async load_installed_apps(frm) {
|
||||
const me = this;
|
||||
await frappe.call({
|
||||
method: "frappe.desk.desktop.get_installed_apps",
|
||||
callback: function (r) {
|
||||
if (r.message) {
|
||||
cur_frm.fields_dict["app"].set_data(r.message);
|
||||
me.set_data(r.message);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue