diff --git a/frappe/core/doctype/file/file.py b/frappe/core/doctype/file/file.py
index 2bfef69c32..4954621665 100755
--- a/frappe/core/doctype/file/file.py
+++ b/frappe/core/doctype/file/file.py
@@ -155,7 +155,7 @@ class File(Document):
self.validate_protected_file()
self._delete_file_on_disk()
if not self.is_folder:
- self.add_comment_in_reference_doc("Attachment Removed", _("{0}").format(self.file_name))
+ self.add_comment_in_reference_doc("Attachment Removed", "{0}".format(self.file_name))
def on_rollback(self):
rollback_flags = ("new_file", "original_content", "original_path")
@@ -767,7 +767,7 @@ class File(Document):
self.add_comment_in_reference_doc(
"Attachment",
- _("{0}").format(f"{file_name}{icon}"),
+ "{0}".format(f"{file_name}{icon}"),
)
def add_comment_in_reference_doc(self, comment_type, text):
diff --git a/frappe/public/js/frappe/ui/group_by/group_by.js b/frappe/public/js/frappe/ui/group_by/group_by.js
index e77742c115..438059483e 100644
--- a/frappe/public/js/frappe/ui/group_by/group_by.js
+++ b/frappe/public/js/frappe/ui/group_by/group_by.js
@@ -243,7 +243,13 @@ frappe.ui.GroupBy = class {
}
apply_group_by() {
- if (this.group_by_doctype != this.aggregate_on_doctype) {
+ console.log(this.aggregate_on_doctype, this.group_by_doctype);
+
+ if (
+ this.group_by_doctype &&
+ this.aggregate_on_doctype &&
+ this.group_by_doctype != this.aggregate_on_doctype
+ ) {
frappe.msgprint(__("Parent-to-child or child-to-parent grouping is not allowed."));
return false;
}