-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
refactor: DB independent quoting and truthy/falsy values #31358
Conversation
erpnext/accounts/doctype/loyalty_program/test_loyalty_program.py
Outdated
Show resolved
Hide resolved
@cpdeethree can you once confirm the reason behind reformatting python strings to use single-quotes? We now autoformat code using black, so it will be turned back to double quotes by black unnless it's considered unsafe like reference: https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#linting |
As noted in our discussion, it looks like some of these changes happened when I originally went through and changed multiple double quoted values at once in the same file - even if it wasn't necessary. I will verify that there are no implications for postgres compatibility with the reformat you added (reverting back to the original) |
Verified that PG has no problem with the changes you updated with the black commit 👍 |
@@ -73,7 +73,7 @@ def get_stock_ledger_entries(report_filters): | |||
"Stock Ledger Entry", | |||
fields=fields, | |||
filters=filters, | |||
order_by="timestamp(posting_date, posting_time) asc, creation asc", | |||
order_by="posting_date asc, posting_time asc, creation asc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpdeethree I think this is fine
however in the past, people have suggested relying on the timestamp function instead of sorting columns individually, do you know of any real differences between these two?
`=` query makes no sense with list of values
Minor, straightforward changes to db independent syntax for table quoting, spacing, and truthy/falsy coercion