* fix(query): check standard field definitions
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* fix(postgres): fix order_by problem in pg
* fix(postgres): fix order_by in get_all for _test_connection_query
* fix: add check to a proper numeric fallback in _get_ifnull_fallback
* test(postgres): fix pg query used in assertion in test_permission_query
* fix(postgres): fix order_by in get_all for possible_link
* fix(postgres): fix order_by in get_all for set_modules
* fix(postgres): fix pg query count *
* fix(postgres): fix order_by in get_all for ask_pass_update
* fix(postgres): fix order_by statement in search_widget
* fix(postgres): fix order_by in get_list for get_stats
* test(postgres): normalize_sql for pg queries in test_arithmetic_operators_in_fields
* test(postgres): normalize_sql for pg queries in test_field_alias_in_group_by
* test(postgres): normalize_sql for pg queries in test_field_alias_permission_check
* test(postgres): fix order_by statement in get_all for test_db_keywords_as_fields
* test(postgres): fix order_by statement in get_all for test_prepare_select_args
* fix(treeview): use 0 instead of false to check since check field is an integer
* fix(postgres): fix order_by in get_all for sync_communication
* fix(postgres): fix order_by in get_all for get_references_across_doctypes_by_dynamic_link_field
* test(postgres): fix order_by in get_all for test_list_summary
* fix(postgres): fix order_by in get_all for email queries
* test(postgres): use order_by none and update assertion for postgres
* fix(postgres): use ILIKE to support case insensitive search in postgres
* test(test_query): update pg specific query assert to use ILIKE
* test(test_query): update test_nested_filters to use ilike instead for PG
* test(postgres): update pg query in assert to test updated qb query
* fix(search): update query to be db-agnostic
* test(postgres): normalize query for pg in test_build_match_conditions
* fix(postgres): suppress ORDER BY when SELECT DISTINCT in query for postgres specific behavior
* fix(postgres): suppress ORDER BY when GROUP BY is explicitly asked for pg specific behavior
* test(postgres): fix test behavior for pg ORDER BY drop when used with GROUP BY
* refactor: reducing noise in code by formatting code
* fix(query): use Star() to handle SQL wildcard character * correctly
* fix(postgres): display warning for ORDER BY fields that will be dropped
---------
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
* feat: global `frappe.in_test` flag
* feat: helper utility to toggle `frappe.in_test`
* fix: use `toggle_test_mode` util
* fix: use `frappe.in_test`
* chore: add comment explaining global `in_test`
* chore: ignore commit replacing flag usage
* test: temporarily disable `frappe.in_test`
this worked earlier because flag was set in werkzeug.local which was separate for API test client
* test: add comment explaining change
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
* feat: add permtype 'select' to DocPerm and CustomDocPerm
* feat: add 'select' perm in rights tupple
* feat: provisions to handle select permission
* feat: toggle href based on permissions
* feat: pass permission type explicitly while validating link in permission check
* fix: sider
* feat: added test cases to validate select perm
* feat: add method frappe.only_has_select_perm to explicitly check the select perm
* fix: if user only has select perm then do not show anchor tag for link fields
* fix: sider