Commit graph

35 commits

Author SHA1 Message Date
Shrihari Mahabal
a87e2654c7 fix: add perm check on unfollow doc 2026-04-29 13:55:21 +05:30
Shrihari Mahabal
56c602e94d fix: add perm check to document follow 2026-04-27 18:00:47 +05:30
Aarol D'Souza
9eef4f6dae
fix: force type check in whitelisted methods (#37044)
* fix(contact): force type check in contact whitelisted methods

* fix(google_indexing): force type check in google_indexing whitelisted methods

* fix(assignment_rule): add type checks to assignment_rule whitelisted methods

* refactor: remove unused args

* fix(queue): add type hints to whitelisted methods in queue.py

* fix(auto_email_report): add type hints to whitelisted methods

* fix(dashboard): add type hints to whitelisted methods

* fix(sidebar_item_group): add type hints to whitelisted methods

* fix(weasyprint): add type hints to whitelisted methods

* fix(backups): add type hints to whitelisted methods

* fix(document_naming_settings): add type hints to whitelisted methods

* fix(get_latest_submissions): add type hints to whitelisted methods

* fix(custom_field): add type hints to whitelisted methods

* fix(customize_form): add type hints to whitelisted methods

* fix(personal_data_deletion_request): add type hints to whitelisted functions

* fix(__init__): add type hints to whitelisted methods

* fix(prepared_report): add type hints to whitelisted methods

* fix(session_default_settings): add type hints to whitelisted methods

* fix(document_follow): add type hints to whitelisted methods

* fix(route_history): add type hints to whitelisted methods

* fix(form_tour): add type hints to whitelisted methods

* fix(dashboard_settings): add type hints to whitelisted methods

* fix(address): add type hints to whitelisted methods

* fix(contact): add type hints to whitelisted methods

* fix(discussion_reply): add type hints to whitelisted methods

* fix(auto_repeat): add type hints to whitelisted methods

* fix: add the missing type hints and misc. corrections

* fix(email): add type hints to whitelisted methods

* fix(permitted_documents_for_users): add type hints to whitelisted methods

* fix: correct the type hints

* fix: int PK types

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2026-02-17 15:16:30 +00:00
Raj Barshikar
da07e558df
refactor: add type hints to document follow API (#36239)
* chore(desk): add type hints to document follow API

* refactor: remove unused imports and apply pre-commit

---------

Co-authored-by: AarDG10 <aarol.dsouza@gmail.com>
2026-01-23 12:58:46 +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
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
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
6c5a099c1e
fix: translatable strings (#27443) 2024-08-19 14:43:19 +00:00
Rushabh Mehta
b5caddeb6f fix(minor): test 2024-08-14 16:13:57 +05:30
Rushabh Mehta
398657c7fa fix(minor): test 2024-08-14 16:13:57 +05:30
Rushabh Mehta
17bb9d535b fix(minor): test 2024-08-14 16:13:57 +05:30
Rushabh Mehta
1d678146a9 fix(styles): cleaner sidebars for list and form 2024-08-14 16:13:57 +05:30
Akhil Narang
5050376c55
fix(document_follow): following was treated as a string not a boolean
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-05-09 14:02:19 +05:30
Ankush Menat
b7bc5d3236
fix(round 3): switch to creation sorting (#25669) 2024-03-27 08:59:04 +00:00
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
Sagar Vora
183f60232c perf: specify reference doctype in filters 2022-08-02 06:15:00 +05:30
Sagar Vora
fac7460fb8
chore: remove duplicate field in get_version (#17674) 2022-07-29 15:10:01 +05:30
Suraj Shetty
d4166dbe20 refactor: Replace html2text with markdownify 2022-07-06 08:23:14 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
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
2022-07-01 11:51:05 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Mohammad Hasnain Mohsin Rajan
fda544f424
refactor!: make automatically following documents optional (#16030)
* fix: make automatically following documents optional

* fix: optimize email triggers for document followed

* test: add tests for document follow settings

* test: sync global search before testing

* fix: extend pypika's cast function to mimic varchar cast in MariaDB

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: phot0n <ritwikpuri5678@gmail.com>
2022-03-25 02:01:15 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
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.
2021-09-03 12:02:59 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* 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
2021-05-26 15:31:29 +05:30
Aditya Hase
56d1954591
fix: Add missing imports 2021-02-22 11:53:26 +05:30
Shivam Mishra
cfc8c3fcdd fix: document follow 2020-12-03 14:04:24 +05:30
Anurag Mishra
0866526d11
fix(Document Follow): Skip Email Account and Email Domain (#11973) 2020-11-24 09:35:18 +05:30
Mangesh-Khairnar
916c363001 fix(document-follow): reduce time taken to check existing records 2020-09-17 12:56:04 +05:30
Rushabh Mehta
aad2375cf3 fix(major): make document events more efficient, fix bug in cache_manager.get_doctype_map 2020-08-17 09:41:54 +05:30
Anurag Mishra
6f5ad343c9
fix: filters for sending hourly updates in document follow (#7481) 2019-05-14 18:40:34 +05:30
Shivam Mishra
398cb9d859
Merge pull request #7477 from Anurag810/followed_fix
fix: disable document follow check
2019-05-14 15:34:38 +05:30
Anurag Mishra
250ccaf9ba fix: mail was also sending after setting of hte document follow uncheck 2019-05-14 15:27:44 +05:30
Anurag Mishra
b9170012b2 feat: added follow on creation and changes done by user will not send to him (#7460)
* feat: added follow on creation

* style: Missing comma and a parameter

* fix: travis

* removed print statement
2019-05-13 14:59:49 +05:30
Rushabh Mehta
af605948bc fix(document_follow): ignore column missing if in patch 2019-03-11 08:55:12 +05:30
Anurag Mishra
cd191439fd feat: Document subscription (#6745) 2019-03-07 14:06:22 +05:30