Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replaced days_diff with date_diff for v15 compatibility #1236

Merged

Conversation

FahidLatheef
Copy link
Contributor

  • Latest Develop branch causes Internal Server Error due to incorrect python import.
  • It should be date_diff instead of days_diff in frappe.utils.data

Copy link

cypress bot commented Jan 7, 2025

lms    Run #962

Run Properties:  status check passed Passed #962  •  git commit 26a6d7b1cf ℹ️: Merge 0550d3aea366a883ba045f71c6f1b66728357dc3 into eb6b72515e19f66ed493ae9208cb...
Project lms
Branch Review fix/days_diff_function_name
Run status status check passed Passed #962
Run duration 00m 29s
Commit git commit 26a6d7b1cf ℹ️: Merge 0550d3aea366a883ba045f71c6f1b66728357dc3 into eb6b72515e19f66ed493ae9208cb...
Committer Fahid Latheef A
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 1
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@pateljannat
Copy link
Collaborator

@FahidLatheef
Copy link
Contributor Author

@FahidLatheef It is not a typo. https://github.com/frappe/frappe/blob/develop/frappe/utils/data.py#L333

I am using a slightly older patch of Frappe (v15.45.1) and this function doesn't exist. Closing this PR.

@FahidLatheef
Copy link
Contributor Author

I did more research. This function days_diff doesn't exist in version-15 releases.

https://github.com/frappe/frappe/blob/version-15/frappe/utils/data.py

@pateljannat
Reopening this PR to handle version-15 users.

@FahidLatheef FahidLatheef reopened this Jan 8, 2025
@pateljannat pateljannat merged commit 64fac45 into frappe:develop Jan 8, 2025
8 checks passed
@pateljannat pateljannat changed the title fix: fixed typo in spelling in frappe.utils.date_diff import fix: replaced days_diff with date_diff for v15 compatibility Jan 8, 2025
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 2.19.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants