Commit graph

1503 commits

Author SHA1 Message Date
Sagar Vora
7d47d10692 fix: override RestrictedPython transformer to allow _dict, revert frappe.as_dict 2022-12-07 13:45:28 +05:30
Sagar Vora
10695d3d49 feat: make context optional when calling render_template 2022-12-07 13:32:38 +05:30
Sagar Vora
f2e1dbe7eb fix: restore _dict, used in Jinja code 2022-12-07 13:13:27 +05:30
Ankush Menat
d389fffbb7
feat: inter-process file locks (#19133) 2022-12-06 16:31:51 +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
Ankush Menat
7d52df875f
perf(install): bulk insert country and currencies (#19084) 2022-12-03 12:03:05 +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
7a3faf23e1
Merge pull request #18664 from barredterra/csv-params
feat: configurable CSV delimiter and quoting
2022-11-29 13:27:24 +05:30
Ankush Menat
465b3f6968 test: use _dict in tests
form_dict is usually _dict, otherwise some unrelated tests will fail.
2022-11-29 11:53:52 +05:30
barredterra
2c0827dda9 fix: test reportview 2022-11-28 12:16:18 +01:00
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
Raffael Meyer
83e2f524e2
Merge branch 'develop' into csv-params 2022-11-26 20:10:51 +01:00
barredterra
839de22d95 feat: add test for exporting reportview as CSV 2022-11-26 20:01:48 +01:00
Gavin D'souza
1a5e5f546b fix: Move function check inside subquery 2022-11-24 16:27:54 +05:30
Gavin D'souza
1f913248aa test: Add more tests for illegal subquery and fn usage 2022-11-24 15:36:31 +05:30
Sagar Vora
6e896aa412 fix: decorator usage 2022-11-21 17:17:18 +05:30
marination
4cd80bd279 fix: Avoid caching unsaved documents and secure whitelist decorator
- Avoid caching documents like 'new-item-1', default to doctype perms instead
- Use secure `whitelist_for_tests` decorator instead
2022-11-21 16:41:37 +05:30
Marica
eec7a7fd13
Merge branch 'develop' into get_role_permissions-js-consistency 2022-11-21 14:03:17 +05:30
marination
ed2804d1c5 test: Cypress test to check basic has_perm and get_perm JS APIs
- Test removes System Manager role for user and expects certain perms
- On Kanban Board DocType, only System Manager is allowed to print/export/email/report/share
- DocType level test only
2022-11-21 13:41:04 +05:30
Faris Ansari
74bce62c62
Merge pull request #18841 from netchampfaris/app-include-site-config 2022-11-17 21:13:11 +05:30
Ankush Menat
f488a4953f
chore: validate ui test helpers at runtime (#18922)
[skip ci]
2022-11-17 18:17:22 +05:30
Faris Ansari
e10d19a317
Merge branch 'develop' into app-include-site-config 2022-11-15 17:19:59 +05:30
Ankush Menat
9b90e620bc chore: disable flaky test
This is
- flaky
- difficult to find source of flake because of crazy tests
- adds little value tbh

[skip ci]
2022-11-15 17:17:10 +05:30
Faris Ansari
cfc2dd4437 test: patch get_hooks to bypass cache 2022-11-15 14:50:38 +05:30
Raffael Meyer
cca25174ab
Merge branch 'develop' into csv-params 2022-11-14 12:38:51 +01:00
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
Aradhya
3759e5bbcd refactor: lint
fix: removed time.sleep
2022-11-12 20:06:17 +05:30
Ankush Menat
6c01d1d417 refactor: hmac generation
Reduce code duplication
2022-11-12 13:05:57 +05:30
Aradhya Tripathi
07bd958dfd
Merge branch 'develop' into bg-submissions 2022-11-12 08:37:55 +05:30
Faris Ansari
e0a725025c test: for app_include_js and app_include_css 2022-11-11 20:47:18 +05:30
Ankush Menat
a7377d23fc
refactor!: Drop deprecated functionality (#18815) 2022-11-11 19:54:36 +05:30
Anand Baburajan
bc0abd9cfd
feat(util): add is_last_day_of_the_month (#18835)
* feat: add is_last_day_of_the_month
2022-11-10 15:18:49 +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
355803e53f
Merge pull request #18814 from ankush/refactor/db
refactor: deprecate unused DB methods + misc
2022-11-09 18:09:52 +05:30
Ankush Menat
b71d93ef9f test: db timeout computation 2022-11-09 15:55:31 +05:30
Ankush Menat
ad7c0816f8
fix: prevent deleting standard doctypes in prod (#18803) 2022-11-08 21:27:41 +05:30
Ankush Menat
ce360b6fce feat: Set default SQL statement timeouts 2022-11-08 14:51:43 +05:30
Ankush Menat
e02b90cd5b
fix: dont allow reading attributes of unsafe objects (#18706) 2022-11-06 17:33:02 +05:30
Ankush Menat
032df946be
test: bg jobs test cleanup (#18767)
* test: fix flaky RQ job tests

Sometimes stop_job doesn't succeed and causes tests to timeout. Reduced
sleep time to avoid this in tests. We are still testing all the
important features - monitoring.

* build(deps): Bump RQ to latest version

Minor bugfixes that affect us

ref: https://github.com/rq/rq/releases

* test: sanity tests for scheduled job types

* test(test_runner): dont set bench_id globally

* refactor: stop_job shouldn't throw error

The intention of use here is to stop stuck jobs or long running jobs, if
for some reason they were stopped by the time command gets executed,
there's no need to throw error.
2022-11-05 14:08:35 +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
Ritwik Puri
ba25e97d4e
Merge pull request #18756 from ankush/qb_simpler
refactor: qb builder class identification
2022-11-04 17:26:57 +05:30
Ankush Menat
f0197d35d6 refactor: qb builder class identification 2022-11-04 15:42:26 +05:30
Ritwik Puri
58062c296e
Merge pull request #18010 from Aradhya-Tripathi/qb-fixes
fix: misc query engine fixes
2022-11-03 21:59:37 +05:30
Raffael Meyer
f0cce34212
Merge branch 'develop' into csv-params 2022-11-03 12:08:08 +01:00
barredterra
87298f5d76 test: export query report as CSV 2022-11-03 12:02:16 +01:00
phot0n
dfe62f2614 test: use double quotes for postgres query assertions 2022-11-03 12:50:38 +05:30
Aradhya
e1719fd30c feat: Added support for table_field.fieldname and tests 2022-11-03 03:56:59 +05:30
Ankush Menat
a1a296ac75
fix: ignore global translations (#18733)
_("string") outside of function/methods don't make any sense cause they
are initialized the moment module is imported. This is already checked
in CI yet people make this mistake.

Ignore and refuse to translate in those cases.
2022-11-03 03:00:03 +05:30