Commit graph

44534 commits

Author SHA1 Message Date
Akhil Narang
44667901bf
feat: allow setting a custom http status code for redirects
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:36:42 +05:30
Akhil Narang
91dce0b007
feat(sentry): drop events which have frappe.throw (#23886)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:34:43 +05:30
bourouffala
3015852ce1
fix: Error when displaying dashboard with number card using average and sum functions (#23883) 2023-12-20 11:13:20 +00:00
Kunhi
b4d3132bf4
fix: optimize clear_permissions_cache method (#23858)
* fix:optimize clear_permissions_cache method

* fix: faster clear user cache on perm change

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-12-20 16:26:17 +05:30
Ankush Menat
052a2527dd
Merge pull request #23874 from ankush/del_check_links
fix: don't allow deleting original doc if amendment exists
2023-12-20 14:13:41 +05:30
Daizy Modi
5213915d66
fix: render new doctype dialog box if doctype is not copied (#23854) 2023-12-20 14:11:01 +05:30
Ankush Menat
02f3fd8470 test: retry flaky password_strength test thrice 2023-12-20 13:57:48 +05:30
Ankush Menat
3d3f982cbe
Merge pull request #23873 from frappe/img_fix
fix: ignore and gracefully handle img optimization failure
2023-12-20 13:12:22 +05:30
Ankush Menat
b51a479fc2 fix: don't allow deleting original doc if amendment exists 2023-12-20 13:11:34 +05:30
Ankush Menat
40bd7cdbfa
Merge pull request #23871 from akhilnarang/fix-sentry-user
fix(sentry): `name` field is ignored
2023-12-20 12:52:22 +05:30
Akhil Narang
39359f9793
fix(sentry): name field is ignored
Only `id`, `username`, `email`, and `ip_address` are accepted here

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 12:43:42 +05:30
Ankush Menat
3524cae48e fix: ignore and gracefully handle img optimization failure
PIL doesn't handle ALL image types. E.g. HEIC fails with bad error.
2023-12-20 12:25:56 +05:30
Ankush Menat
fdcd8ab0c6
Merge pull request #23866 from ankush/deleted_doc
fix: Allow periodically clearing deleted documents
2023-12-20 12:24:47 +05:30
Ankush Menat
5ecacd0cd7
Merge pull request #23865 from ankush/no_virtual_select_star
fix: skip virtual fields in perm level checks during DB Query
2023-12-20 12:15:48 +05:30
Ankush Menat
1cbcf537d9 fix: Allow periodically clearing deleted documents 2023-12-20 12:09:15 +05:30
Ankush Menat
5deabdde21 fix: skip virtual fields in perm level checks during DB Query
DB Query can't access virtual fields so it should ignore all virtual
fields.
2023-12-20 12:00:08 +05:30
Akhil Narang
178b699466
Merge pull request #23432 from marination/doc-connections
fix: Treat Document Links entries as all non-std fields
2023-12-19 16:05:58 +05:30
Akhil Narang
e38b5e04f8
fix(test_customize_form): drop checking of flags.update_db
The value changed is being checked directly
Checking the flag breaks if this or a similar test is run multiple times on the same database

Also extract 255 into a separate variable

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-19 15:50:13 +05:30
Akhil Narang
58b75d7c35
Merge pull request #23855 from sagarvora/fix-get_rendered_raw_commands
fix: dont pass removed parameter `name`
2023-12-19 12:24:44 +05:30
Sagar Vora
3820926ffa fix: dont pass removed parameter name 2023-12-19 12:08:28 +05:30
Raffael Meyer
99f0745302
style: new app boilerplate (#23847)
* style: add spaces to hooks boilerplate

Black wants comments to start with a space. Adding them here means less formatting later.

* style: init_template

Put version on the first line and use double quotes.
2023-12-18 23:13:13 +05:30
Ankush Menat
7e821a131a
fix: allow enabling telemetry for either posthog/sentry (#23845)
posthog is not required to be present everwhere and is more of a
solution for onboarding problems. Sentry on other hand should be
available everywhere.
2023-12-18 19:41:41 +05:30
Suraj Shetty
2564d0e939
Merge pull request #23512 from GursheenK/include-filter-values-in-exported-report-excel 2023-12-18 12:40:37 +05:30
Ankush Menat
85a661f273
test: flakey currency UI test (#23834) 2023-12-18 12:29:20 +05:30
Gursheen Anand
806708650c chore: linter issue 2023-12-18 12:15:51 +05:30
Ankush Menat
4c5511721d
Merge pull request #23760 from barredterra/jinja-syntax
feat: Jinja syntax highlighting
2023-12-18 11:07:33 +05:30
Akhil Narang
f110b6eea3
refactor(data_import): handle RQ timeouts better (#23811)
* refactor(data_import): handle RQ timeouts better

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* refactor(data_import): display count of documents even for timed out jobs

Also handle "0" cases better - should be plural there

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-18 10:56:51 +05:30
barredterra
70c7315ed8 Merge branch 'develop' into jinja-syntax 2023-12-17 19:54:16 +01:00
Ankush Menat
ca33deae12 fix: cast SQL booleans to python 2023-12-17 12:07:14 +05:30
Ankush Menat
3adc83e7c6
perf(migrate): update only affected users via role profile (#23821)
This is same as https://github.com/frappe/frappe/pull/23820 but for role
profile
2023-12-16 08:29:26 +00:00
Ankush Menat
c38e842646
perf(migrate): Only re-evaluate users which are potentially changed (#23820)
When roles are added in fixture `desk_access` always appears to be
"changed" because of how fixtures work.

This causes all users with the said role to be re-evaluated. This is
unnecessary computation because desk_access rarely changes in most apps.

Fix: See if role's desk access is same as user's desk access and don't
re-evalute them.

E.g. If role fixture without desk access is being migrated then it will
skip all users who are already website users. Likewise role with desk
access will skip all users who are already system users.
2023-12-16 08:18:46 +00:00
Ankush Menat
40e48c9ac4
feat: describe-database-table to get stats about a table (#23813)
* feat: `describe-database-table` to get stats about a table

This provides description of table, indexes, total row count in machine
parseable format.

Towards https://github.com/frappe/press/issues/1265

* Update test_commands.py
2023-12-15 17:53:11 +05:30
Gursheen Anand
801b9e1140 fix: labels for boolean filters 2023-12-15 17:51:22 +05:30
Gursheen Anand
4a7c60fb5a refactor: use simple condition for filter values 2023-12-15 17:02:09 +05:30
Ankush Menat
d39ecd3932
fix: Consider user and sender both for "system user" (#23806)
Email is "sender" which might not be linked with any user.
2023-12-15 12:51:29 +05:30
Shariq Ansari
254e22f5ab
Merge pull request #23804 from shariquerik/load-100-for-larger-screen
fix: load 100 records for larger screen
2023-12-15 12:36:06 +05:30
Shariq Ansari
2fa1120b0f fix: consider height istead of width 2023-12-15 11:45:14 +05:30
Shariq Ansari
87e0ccd555 fix: load 100 records for larger screen 2023-12-15 11:31:25 +05:30
Niraj Gautam
eb5448209e
fix(jinja): Update error message in validate_template function (#23783)
[skip ci]
2023-12-14 21:10:47 +05:30
Ankush Menat
b7c2989823
feat: add-database-index command to add and persist custom indexes (#23787) 2023-12-14 15:16:49 +00:00
Ankush Menat
687752359d
perf: Primary key is never nullable (#23788)
People ususally write queries like these...

```
frappe.get_all(doctype, {"name": ("in", list_of_docs))
```

Ocassionally, the `list_of_docs` is empty because it's dynamically
generated and in this case we end up doing full table scan to find... nothing!
2023-12-14 15:01:19 +00:00
Akhil Narang
cd7be151f7
fix(rq_job): resolve deprecation warning (#23784)
env/lib/python3.11/site-packages/rq/job.py:796: DeprecationWarning: job.exc_info is deprecated, use job.latest_result() instead.
warnings.warn("job.exc_info is deprecated, use job.latest_result() instead.", DeprecationWarning)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-14 15:22:26 +05:30
Gursheen Kaur Anand
9ec54feff9
fix: skip using frm object for routing to audit trail (#23603)
[skip ci[
2023-12-14 11:03:59 +05:30
Ankush Menat
174e24f159 fix: validate custom portal menu entries during sync 2023-12-13 17:55:05 +05:30
Ankush Menat
119a4bdbc1
fix: remove delay from numeric field selection (#23759) 2023-12-13 16:16:27 +05:30
Ankush Menat
957f9a01b5
fix: discard deleted doctypes unconditionally (#23770) 2023-12-13 15:57:18 +05:30
Arjun
8e4b0ade78
fix: remove web_form rate limit key (#23767) 2023-12-13 15:39:10 +05:30
Ritwik Puri
0aea1de0f4
chore: remove testing internet connection for emails (#23581) 2023-12-13 09:55:29 +05:30
Corentin Flr
4f809630c5
fix: Set sort_order to DESC if sort_field is modified (#23697)
Global search and replace operation, including single doctypes where it does not really matter.
2023-12-13 09:52:14 +05:30
barredterra
468f3c6738 feat(Web Template): switch from pure HTML to Jinja highlighting 2023-12-12 20:06:45 +01:00