Gavin D'souza
c28e4590e8
fix(rest): Delete doc attr if insufficient field permissions
2023-01-09 15:47:21 +05:30
rohitwaghchaure
0e9d16820b
fix: For Update for child table ( #19436 )
2023-01-02 11:35:21 +05:30
Sagar Vora
e84cea9901
Merge pull request #19395 from resilient-tech/old-cache-code-removal
...
chore: remove code for handling old dict-based meta cache
2022-12-31 11:11:39 +00:00
rohitwaghchaure
a72fdcbd89
fix: not able to make delivery note from pick list ( #19418 )
2022-12-27 17:58:04 +05:30
Sagar Vora
1458429d98
chore(Document): remove code that resets self.latest ( #19399 )
2022-12-24 00:13:28 +05:30
Sagar Vora
d072e20cbd
chore: fix typo
2022-12-23 06:13:07 +00:00
Sagar Vora
7fdcafddce
chore: remove code for handling old dict cache
2022-12-23 06:13:07 +00:00
Daizy Modi
d88ef967b9
feat: hook ignore_links_on_delete to skip doctypes on delete ( #19347 )
...
* feat: hook `ignore_links_on_delete` to skip doctypes on delete
* fix: helper comment
* fix: helper comment
* test: test case for `ignore_links_on_delete`
* test: fix test case
2022-12-20 11:17:28 +05:30
Ankush Menat
a1132075a0
Merge pull request #19326 from resilient-tech/get-latest-fix
...
perf: reuse `_doc_before_save` in `doc.get_latest`
2022-12-19 12:30:30 +05:30
Sagar Vora
2fd2d426cc
fix: better check of whether doctype is child table ( #19329 )
...
* fix: better check of whether doctype is child table
* perf: init `_table_fields` earlier
2022-12-19 11:50:16 +05:30
Sagar Vora
c453ad2d97
perf: reuse _doc_before_save in doc.get_latest
2022-12-17 07:56:54 +00:00
Hussain Nagaria
da7fd35e49
fix: handle HTML code field's has_content
2022-12-14 19:36:07 +05:30
Ankush Menat
ee5c82e985
fix(DX): validate virtual doctype controllers
2022-12-13 14:18:19 +05:30
Raffael Meyer
bb5b0e5e64
refactor!: remove compare util from frappe package ( #19234 )
...
Use `from frappe.utils import compare` instead of `frappe.compare`.
2022-12-11 23:20:21 +05:30
Saqib Ansari
f6677125d3
fix: do not rename select field options and values on doctype rename ( #19223 )
2022-12-09 16:36:58 +05:30
Raffael Meyer
6e8820e627
chore: translate doctype in link error ( #19164 )
2022-12-07 00:31:39 +05:30
Sagar Vora
4acddacf2d
chore(Document): simplify get_permlevel_access
2022-12-04 02:44:18 +05:30
Raffael Meyer
c7ef28fa0c
fix: don't validate to & from dates if any one is missing in validate_from_to_dates ( #19079 )
2022-12-03 18:32:59 +05:30
Raffael Meyer
04d1292cf1
fix: consistent translation in meta.get_label ( #19080 )
2022-12-02 23:38:15 +05:30
Ankush Menat
442060a96a
Merge pull request #17150 from ankush/bulk_object_inserts
...
feat: bulk insert simple Docs and iterator support for db.bulk_insert
2022-11-29 13:33:25 +05:30
Ankush Menat
a6af1ed542
feat: bulk insert simple Document objects
2022-11-28 15:32:20 +05:30
gavin
6062d812a1
fix(db_query): Disallow usage of certain functions in *_by ( #18981 )
...
* fix(db_query): Disallow blacklisted functions in (order|group)_by
Changes:
- allow only functions that are not blacklisted in *_by clause:
currently just sleep
- perf improvemnts: lower, in, split, strip & other low hanging micro optimizations
Handle the following use cases:
- upper/lower case function usages
- spaces between function name and brackets
* test(db_query): Add tests for *_by checks
2022-11-28 12:42:29 +05:30
gavin
35827af172
fix: Strip white spaces on lower cased field value
...
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2022-11-25 12:39:11 +05:30
Gavin D'souza
1a5e5f546b
fix: Move function check inside subquery
2022-11-24 16:27:54 +05:30
Gavin D'souza
575d32ec35
fix(db_query): Space resilient matching
2022-11-24 15:36:28 +05:30
Sagar Vora
f3c00c2bdc
perf: dont fetch meta unless required ( #18907 )
2022-11-17 13:15:35 +05:30
Ritwik Puri
518b7e1c66
Merge pull request #18251 from Aradhya-Tripathi/bg-submissions
...
feat: Background submissions for submittable doctypes
2022-11-12 20:06:57 +05:30
Ritwik Puri
ef758130d6
Merge pull request #18852 from resilient-tech/simpler-init
...
chore(BaseDocument): simplify `_table_fieldnames` property init
2022-11-12 11:09:07 +05:30
Aradhya Tripathi
07bd958dfd
Merge branch 'develop' into bg-submissions
2022-11-12 08:37:55 +05:30
Sagar Vora
7f3ea7a520
chore(BaseDocument): simplify _table_fieldnames property init
2022-11-12 00:36:15 +05:30
gavin
9ad0538521
perf(doc): skip order_by when name is set in load_from_db ( #18837 )
...
Setting ORDER BY clause in the SQL nudges MariaDB to not use index
(even) for primary keys.
2022-11-10 16:53:28 +05:30
gavin
a093b7b34c
perf(workflow): get_transitions ( #18834 )
...
* Load from db only if doc passed is not of type Document. This was
added earlier to load in case of dicts. ref: https://github.com/frappe/frappe/pull/11883
* Move blocks to evaluate only if required
* Add typing hints
2022-11-10 16:22:28 +05:30
Ankush Menat
f34f7030a3
refactor: remove txt param from generate_hash use
2022-11-10 11:56:48 +05:30
Sagar Vora
a42ca7d8c1
fix: raise exception if doc before save is not found ( #18796 )
...
* fix: raise exception if doc before save is not found
* test: ensure error is raised when trying to save new doc using `doc.save()`
* chore: add comment explaining condition
* test: clearer name and docstring
2022-11-09 19:45:41 +05:30
Ankush Menat
ad7c0816f8
fix: prevent deleting standard doctypes in prod ( #18803 )
2022-11-08 21:27:41 +05:30
Aradhya
f587140f6f
Merge branch 'develop' of https://github.com/Aradhya-Tripathi/frappe into bg-submissions
2022-11-04 18:34:41 +05:30
Ankush Menat
0175fafde3
Merge pull request #18491 from resilient-tech/perf-set-document_naming
...
perf: cache document naming rule to avoid recurring db calls
2022-11-04 17:13:19 +05:30
Sagar Vora
8b84042037
fix: load doc_before_save in check_if_latest ( #18752 )
2022-11-04 10:44:17 +05:30
Daizy
78d30905ac
refactor: get_doctype_map() using single query and use generator for caching
2022-11-02 09:58:34 +00:00
Daizy
28a124ca47
perf: cache document naming rule to avoid multiple db call
2022-11-02 09:58:34 +00:00
Aradhya
5703303abb
Merge branch 'develop' of https://github.com/frappe/frappe into qb-fixes
2022-11-01 13:45:11 +05:30
Sagar Vora
cb7d25a293
fix(meta): ensure that insert_after is always considered when sorting fields ( #18682 )
...
* fix(meta): ensure that `insert_after` is always considered when sorting fields
* test: add nosemgrep to comment
Co-authored-by: Dany Roberts <danyrt@wahni.com>
2022-10-31 15:37:55 +05:30
Ankush Menat
8cca50bf26
refactor: remove naming case feature ( #18672 )
...
This has never worked since 2016... which can mean two things:
- No one really uses this.
- If I fix this now suddenly people will find different behaviour in
naming because `name_case` is selected in some doctypes (but never
tested)
2022-10-31 11:23:49 +05:30
Aradhya Tripathi
f10572cf53
Merge branch 'develop' into qb-fixes
2022-10-29 20:38:52 +05:30
Sagar Vora
6d45b500a1
perf: load _doc_before_save sooner to avoid DB call in check_if_latest ( #18666 )
...
* perf: load `_doc_before_save` sooner to avoid DB calls in `check_if_latest`
* fix: specify `for update` in `load_doc_before_save`
2022-10-29 17:55:57 +05:30
Aradhya
e6a281f19e
refactor: better naming
2022-10-27 13:11:15 +05:30
Aradhya
7cefc240ac
fix: merge conflicts
2022-10-21 14:22:51 +05:30
Aradhya
4a573e252c
Merge branch 'develop' of https://github.com/frappe/frappe into qb-fixes
2022-10-20 22:25:44 +05:30
Daizy Modi
fce9ccedaa
fix: only execute generator if value is not found in redis cache ( #18472 )
...
* fix: use of generator in
* fix: improve docstring
* fix: improve docstring
* fix: directly assign value to flags
Co-authored-by: Daizy <DaizyModi>
2022-10-20 16:48:03 +05:30
Ankush Menat
20593f155d
fix: delete custom tables when doctype is deleted ( #18433 )
...
* fix: delete custom tables when doctype is deleted
2022-10-19 16:45:56 +05:30