Without proper grouping, OR conditions from shared docs could bypass WHERE filters:
WHERE filter=X AND perm_cond OR shared_cond -- shared_cond ignores filter!
With proper grouping:
WHERE filter=X AND (perm_cond OR shared_cond) -- correct behavior
* fix!: Remove badly written default portal list views
* fix!: Remove guest permissions from web form list endpoint
* test: cleanly terminate gunicorn
int sometimes ends up leaving socket open
* fix: Always bold report header row
* fix: update test cases
* refactor: add option to bold filter rows in XLSX output
* chore: minor changes
* chore: rename index variable
* revert: undo bold filters param use
* refactor: remove duplication for building xlsx data
* revert: add has_filters parameter to check for filter row bold
* refactor: add type hints and docstrings for XLSX data handling functions
Replaced the old comma-split based email parsing with `email.utils.getaddresses`
to correctly handle RFC 5322 formatted addresses, including display names
containing commas (e.g. `"Last, First" <email@example.com>`).
The previous implementation incorrectly split on commas and treated parts of
display names as standalone emails, causing valid inputs to fail validation and
breaking Communication creation (e.g. `"Gritton, Howard" <hgrit@example.com>`).
The new validator:
- correctly parses display names with commas
- handles multiple addresses and multiline input
- skips undisclosed recipients
- preserves existing EMAIL_MATCH_PATTERN validation
- returns only the email addresses (same as before)
Added additional test cases covering RFC-compliant inputs and empty-addr scenarios.
Fixesfrappe/frappe#27337.
* fix(postgres): add rollback to prevent crash on hash collision
* fix(postgres): rollback to savepoint to prevent crash on hash collision
* fix(postgres): tighten bounds for a rollback to savepoint for a better perf
* fix(postgres): Handle hash collision efficiently with ON CONFLICT
* refactor: better naming
- Private methods
- "rows" is not a correct name for single record's name
* fix: Bad error handling
- Why raise postgres error?
- Let default error raising/handling happen
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* 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>
* test: skip DB-specific tests using new unimplemented_for decorator
* test: use unimplemented to skip tests with implementation problems
* test: update unimplemented to consider multi-DBs
* test: skip test_unbuffered_cursor using unimplemented for pg and sqlite
* test: update unimplemented wrapper
The CI check was incorrectly nested inside the dev_server condition,
preventing test endpoints from being accessible during CI runs using
bench execute. Now CI is checked independently.