Commit graph

550 commits

Author SHA1 Message Date
Sagar Vora
d9f1fc9aee perf: use __dict__ directly 2025-06-21 20:08:02 +05:30
Sagar Vora
326c57af07 chore: remove dead meta keys 2025-06-21 20:07:10 +05:30
Ankush Menat
f56c405e26
fix: Remove meta-bundle caching (#33029)
- This has never worked
- using `modified` isn't a good way to invalidate this cache because it
  doesn't change with customization
2025-06-20 18:33:30 +05:30
Ankush Menat
3bb70a905d
fix: restrict method types in few whitelisted funcs (#32984) 2025-06-18 11:02:57 +05:30
sokumon
b79c5476a7 fix: restrict fields according to permlevel after update as well 2025-06-17 20:17:50 +05:30
Ankush Menat
49f582ae57 perf: Use lazy doc in a lot more places 2025-06-11 09:55:45 +05:30
Aayush Dalal
ca5b4cea0b
fix: throw permission error (#32860) 2025-06-10 08:47:49 +05:30
Corentin Forler
f5e99424ce
fix(load): Don't fetch Dynamic Link titles if missing doctype 2025-04-26 14:42:34 +02:00
Ejaaz Khan
002892d0bf
Merge pull request #32300 from iamejaaz/35786-module-not-found
fix: Module not found error for custom doctypes
2025-04-25 15:54:04 +05:30
Ejaaz Khan
2e0db2d69e fix: Module not found error for custom doctypes 2025-04-25 14:51:16 +05:30
Ankush Menat
b4f8549c52
perf: cast todo queries for int PK (#32295)
https://github.com/frappe/frappe/issues/32287
2025-04-25 05:49:11 +00:00
Ankush Menat
afc19dec10
perf: manually cast doc.name to string (#32292)
This avoid full table scans and undesired implicit casting at MySQL level.
2025-04-25 10:51:08 +05:30
Raffael Meyer
7c2205b703
feat: publish comment from desk (#32256) 2025-04-24 13:57:50 +02:00
sokumon
196f76028f fix: remove leaderboard and custom timeline handling 2025-04-17 00:26:57 +05:30
sokumon
a1fca6ab63 fix: remove energy points / social module 2025-04-17 00:26:57 +05:30
Akhil Narang
ad32216040
fix: support sqlite
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-04-15 13:59:16 +05:30
Raino-Harvest
33f3b54e09
refactor: handled condition in single line for status alert in submittable doctype
Removed unnecessary lines in "if-else" condition and handled in single line.
2025-03-28 12:36:10 +05:30
Raino-Harvest
aa203e3341
fix: condition based alert for Submittable DocTypes while Save and Submit 2025-03-27 20:44:32 +05:30
Sagar Vora
146d50e5d4 chore: fix typo in new DocStatus constant 2025-03-05 08:29:47 +05:30
Soham Kulkarni
ce237efd58
Merge pull request #31386 from sokumon/orphan-child-table
fix: add check for child doctype if it has a valid parent
2025-02-25 14:33:20 +05:30
Ankush Menat
d2fe49c0c2 fix: potential mismatch between meta and formmeta 2025-02-25 12:25:45 +05:30
Ankush Menat
fe3e5021a4 perf: use client_cache for form meta 2025-02-25 12:25:42 +05:30
Sagar Vora
b381cc4874
Merge branch 'develop' into ref-docstatus 2025-02-24 15:22:06 +05:30
Sagar Vora
fcf657ba80 perf: improved DocStatus API and other minor improvements 2025-02-24 12:51:10 +05:30
sokumon
d943c9e463 fix: dont skip if any record is present 2025-02-23 19:49:41 +05:30
sokumon
78df15970c fix: add check for child doctype if it has a valid parent 2025-02-23 00:59:03 +05:30
Corentin Forler
7f0aa436f3
Merge pull request #31363 from cogk/fix-check-empty-assign_to-comment
fix(assign_to): Check if HTML description is empty
2025-02-21 00:03:00 +05:30
Akhil Narang
405d325291
Revert "Merge pull request #27578 from akhilnarang/sanitize-html"
This reverts commit 535220ce43, reversing
changes made to fe192025a5.
2025-02-20 13:06:36 +05:30
Sagar Vora
f4062b4d7a fix: ensure consistent error in response 2025-02-19 12:10:59 +05:30
Ejaaz Khan
701e744211
Revert "fix(_get_communications): clean email content before returning" 2025-02-13 23:32:55 +05:30
Akhil Narang
80d20ff745
fix(get_linked_docs): check if user can read doctype before fetching a list
Users might not have access to all the possible linked doctypes - they should still be able to access the others

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-02-12 18:34:43 +05:30
Ankush Menat
429dab759d
perf: Skip loading EPS if not enabled (#31099)
It's disabled by default 🤷
2025-02-04 07:28:29 +00:00
Ankush Menat
84f9c5d48a
Merge pull request #31098 from ankush/perf/docinfo_1
perf: speedup docinfo - skip tags when not used
2025-02-04 12:41:29 +05:30
Ankush Menat
a8bfd540e1 perf: Avoid querying default email account on every load 2025-02-04 12:31:31 +05:30
Ankush Menat
7c67ca43ef perf: index tags for a document and dont track changes 2025-02-04 12:22:09 +05:30
Ankush Menat
fbd3cadee2
revert: error/webhook logs on every document (#31096)
We serve millions of requests for reading a document, it doesn't make
sense to check error and webhooks on all of them. Not all documents even
have this configured.

If you need it, add it using "connections dashboard" or some custom code.
2025-02-04 06:42:33 +00:00
Deepesh Garg
8e101182f2
Merge pull request #29038 from deepeshgarg007/linked_doctypes
perf: Ignoring linked doctypes on cancel
2025-01-07 15:49:42 +05:30
Deepesh Garg
5f31ffcc54 chore: linting issues 2025-01-06 17:55:28 +05:30
Ankush Menat
546260162d perf: Skip link checking on internal deletes
These are deletes that aren't user triggered and these documents are
typically never "linked" somewhere else. So skip all expensive link /
dynamic link checks.
2025-01-06 11:48:19 +05:30
Deepesh Garg
d2e4d63c8f fix: Ignoring linked doctypes on cancel 2025-01-03 18:23:20 +05:30
ruthra kumar
cb89393d24 refactor: temporary key for child rows 2025-01-02 15:33:15 +05:30
Akhil Narang
0d124ccd37
fix(_get_communications): clean email content before returning
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-24 15:11:36 +05:30
Balamurali M
773bf810af
perf(version): Make get_versions fast for autoincrement doctypes (#28847)
Since docname is varchar, indexes won't work when int as passed as
value.
2024-12-21 10:41:32 +05:30
Ankush Menat
30ec033747
perf: Speedup get_doc by another ~1.5x (#28807)
* perf: Reduce impact of forced cache replacement on every doc access

* fix: clear cache before processing users

Note: This is just an artifact of testing model, this won't have any real
effect on execution in real system.

Basically `enqueue_on_commit` is not respected in tests and it can't be
practically supported either.
2024-12-17 16:48:43 +05:30
Akhil Narang
84ef6ec677
refactor: fixup with ruff 0.8.1
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:18:04 +05:30
Raffael Meyer
9208b58b6f
refactor: use doc.check_permission (#28317)
* refactor: use `doc.check_permission`

* refactor(delete_doc): check_permission_and_not_submitted
2024-11-22 10:41:24 +01:00
David Arnold
057139ea2e
chore(communication): cleanup unused code (#28199)
* chore: feedback doctype no longer exists

missed from https://github.com/frappe/frappe/pull/17479

* chore: remove unused communication type

This was removed and migrated already in v12:

```
frappe/patches/v12_0/setup_comments_from_communications.py:	frappe.db.delete("Communication", {"communication_type": "Comment"})
```
... comming from 41d90fa6d1
which effectively reverted 465318878e
2024-11-14 00:12:14 +01:00
Akhil Narang
9b5af4a603
fix: set print_logs=False for some has_permission() calls
This otherwise results in a lot of spam like: https://github.com/frappe/frappe/pull/27931#issuecomment-2396505626

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-10-07 16:00:39 +05:30
David Arnold
c114e5fae8
refactor: unit vs integration treewide (#27992)
* refactor: constitute unit test case

* fix: docs and type hints

* refactor: mark presumed integration test cases explicitly

At time of writing, we now have at least two base test classes:

- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase

They load in their perspective priority queue during execution.

Probably more to come for more efficient queing and scheduling.

In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.

* feat: Move test-related functions from test_runner.py to tests/utils.py

* refactor: add bare UnitTestCase to all doctype tests

This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
2024-10-06 09:43:36 +00:00
David Arnold
92ee2ce291
Merge pull request #27931 from blaggacao/feat/sidebad-with-log-links
Feat: sidebar with log links
2024-09-30 13:41:25 +02:00