Skip to content

Commit

Permalink
fix: only notify for modified greater than DB (#26070)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Apr 20, 2024
1 parent 37223b3 commit d11f8e7
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 @@ -1030,7 +1030,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 d11f8e7

Please sign in to comment.