Skip to content

Commit

Permalink
fix: only notify for modified greater than DB (#26070) (#26071)
Browse files Browse the repository at this point in the history
(cherry picked from commit d11f8e7)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Apr 20, 2024
1 parent 8dfee2a commit 224d8aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/core/doctype/doctype/doctype.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ def check_pending_migration(self) -> bool:

file = Path(get_file_path(frappe.scrub(self.module), self.doctype, self.name))
content = json.loads(file.read_text())
if content.get("modified") and get_datetime(self.modified) != get_datetime(content.get("modified")):
if content.get("modified") and get_datetime(self.modified) < get_datetime(content.get("modified")):
frappe.msgprint(
_(
"This doctype has pending migrations, run 'bench migrate' before modifying the doctype to avoid losing changes."
Expand Down

0 comments on commit 224d8aa

Please sign in to comment.