Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache ( #21282 )
2023-06-08 11:47:17 +05:30
Ankush Menat
40b3cd82bc
feat!: frappe.cache() -> frappe.cache ( #21279 )
...
This is more intuitive and consistent with other things like `frappe.db`.
PS: This is quite likely to break some weird usage which I can't guess right now. Normal usage inside request/job cycles will continue to work as it used to.
2023-06-07 22:47:45 +05:30
Ankush Menat
26722b1a1c
fix: ignore ConnectionError in frappe.cache().exists()
2023-06-03 22:53:10 +05:30
Ankush Menat
0d056a3a2b
test: fix broken tests
...
Fixture test:
This is broken cause it's trying to find doctype after it has been
deleted (wut?)
It was working so far because cache wasn't cleared correctly so you'd
still find it from cache.
db.set_value test:
converted to use last query instead of patching SQL
2023-06-03 22:53:10 +05:30
Ankush Menat
7d50ef19d3
perf: Delete multiple keys in O(1) redis calls
...
Currently we call redis for each key, redis already supports deleting
multiple keys in one go.
2023-06-03 22:53:10 +05:30
Ankush Menat
4193a251a5
fix: Invalidate cache on rollback too
...
Steps:
- Document modified
- Document refetched from cache
- Transaction rolled back
- Cache now contains unmodified changes.
2023-06-03 22:53:10 +05:30
Ankush Menat
0b9dee4791
test: db callbacks
2023-06-03 18:44:19 +05:30
Ankush Menat
54ae0c4a21
refactor: move flush_realtime_log to realtime.py
...
This doesn't have anything to do with databases
2023-06-03 18:44:19 +05:30
Ankush Menat
ccc107b41f
test: use db.before_commit
2023-06-03 18:44:19 +05:30
Ankush Menat
b3d370a0b1
refactor!: remove rollback_observers
...
use `frappe.db.after_rollback.add` instead
2023-06-03 18:44:19 +05:30
Ankush Menat
7e9ef00bea
refactor!: Remove frappe.db.add_before_commit
...
Not used anywhere, use `frappe.db.before_commit.add()` instead.
2023-06-03 18:44:19 +05:30
Sagar Vora
81d5160ac1
test: ensure stricter filters when validate_filters is passed
2023-05-31 14:16:52 +05:30
Sagar Vora
9f5a994f70
fix!: improved filter validation in Engine.get_query
2023-05-31 14:16:52 +05:30
Ankush Menat
4a81d9f8e3
feat!: populate fields from kwargs in frappe.new_doc ( #21190 )
...
This makes it similar to `get_doc` API BUT still signifies intent that
it's a "NEW" document.
Minor Breaking Change: positional arguments are now forcefully keyword
arguments. Only seems to be used internally from what I can tell.
https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/frappe/.*+/frappe.new_doc%5C%28.*%3F%2C.*%3F%5C%29/+lang:python+&patternType=regexp&case=yes&sm=0&groupBy=repo
2023-05-31 12:29:31 +05:30
Ankush Menat
a1c40d9158
feat: support tree-link-fields filtering in QB
2023-05-29 17:00:37 +05:30
Ankush Menat
e5878b0c68
test: reduce duplication
2023-05-29 15:35:38 +05:30
Sagar Sharma
a43ad15eab
feat: Truncate QB function
2023-05-26 14:03:47 +05:30
Sagar Sharma
3f0b03c808
feat: Round QB function
2023-05-26 14:03:12 +05:30
Gursheen Kaur Anand
49fe6e0c98
feat: patches.txt template added by default for new apps #21046 ( #21070 )
...
* Added patches.txt template in boilerplate
* test: new app patches.txt
* style: formatting
---------
Co-authored-by: Gursheen Anand <gursheen@frappe.io>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-05-24 14:47:06 +05:30
Suraj Shetty
bd737d3616
Merge branch 'develop' into fix-note-2
2023-05-16 07:53:15 +05:30
Ritwik Puri
4bd32bcf04
fix: naming part should be empty if field is empty ( #20978 )
2023-05-14 00:41:12 +05:30
Faris Ansari
2df7fdd79e
Merge pull request #20908 from netchampfaris/qb-getquery-child-fields-syntax-sugar
2023-05-11 12:02:30 +05:30
Ankush Menat
e0f465ed9c
test: expected failing test
2023-05-09 12:42:25 +05:30
Faris Ansari
7e7b1e024a
test: for child query in qb.get_query
2023-05-08 18:55:11 +05:30
William Luke
e0ed7d3b97
fix(oauth): add exp to idToken ( #20694 )
2023-05-05 01:19:03 +05:30
gavin
c4ecd33357
Merge branch 'develop' into fix-20689
2023-04-27 14:38:32 +05:30
Ankush Menat
109a549a23
fix: pass reference_doctype to search query methods ( #20842 )
...
frappe.call ensures that it's only passed to functions which can accept
it, so nothing to worry about ~ backward compatible change.
2023-04-25 18:31:14 +05:30
Gavin D'souza
340617c1e1
test: Add check to make sure select & search fields intersect
2023-04-22 15:07:14 +05:30
Gavin D'souza
c0537c74da
test: Add check for permitted fields
2023-04-22 13:28:17 +05:30
Suraj Shetty
3028918f98
Merge branch 'develop' into fix-note-2
2023-04-17 13:19:48 +05:30
Ankush Menat
76e576c83e
test: fix print view test from lang
2023-04-14 09:07:00 +05:30
barredterra
44bb745035
fix: change pretty date expectations in test
2023-04-11 15:56:05 +02:00
Ankush Menat
d7b474f4ac
Merge pull request #20648 from ankush/translations_hooks_order
...
fix(translations)!: load translation in installed app order
2023-04-11 18:29:01 +05:30
Ankush Menat
6fa732e2f7
test: flake in redis caching test
...
[skip ci]
2023-04-11 12:29:59 +05:30
Ankush Menat
361e44de1d
fix(translations)!: load translation in installed order
...
- translations are loaded in apps.txt order this doesnt make much sense.
- translations are loaded from apps which aren't even installed, again
doesn't make sense.
Breaking but necessary change.
2023-04-11 12:10:45 +05:30
Ankush Menat
a3a9e40aa4
fix: log requests even if no response ( #20638 )
2023-04-11 07:29:14 +05:30
Deepesh Garg
c0ae00168d
chore: Only run on mariadb
2023-04-10 13:58:06 +05:30
Deepesh Garg
5d61ed2d8f
test: Update test
2023-04-09 21:26:35 +05:30
Deepesh Garg
68b1051f69
test: Set defualts
2023-04-09 20:43:10 +05:30
Deepesh Garg
5527048592
test: Create user
2023-04-07 11:49:25 +05:30
Deepesh Garg
087caff4cd
test: Add test for user perm defaults
2023-04-07 11:33:22 +05:30
Raffael Meyer
417f2bbd97
Merge branch 'develop' into fix-note-2
2023-04-05 19:14:28 +02:00
Ankush Menat
5fff6698ad
fix: use develop as branch name for new apps
...
dont ask me why
2023-04-02 15:26:32 +05:30
Marica
f206b1582e
test: Kanban Test fails to remove System Manager role ( #20505 )
...
* fix: Kanban Test fails to remove System Manager role
- As there's only one user with System Manager role, role removal is reverted
- Add another user with this role, so that role removal on test user works
* chore: Reuse `create_test_user` util
* fix: user switching in kanban test
---------
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2023-04-02 15:14:40 +05:30
Ankush Menat
45c86e2ff8
fix: nestedset rename ( #20498 )
2023-03-29 12:49:28 +05:30
Raffael Meyer
6096e45b36
test: switch tests to supported methods ( #20494 )
...
* fix: switch tests to supported methods
get_fetch_fields, update_linked_doctypes
* test: semantic assertions
* test: fixup deprecation tests imports
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-29 10:31:01 +05:30
Ankush Menat
513a209d53
test: fix test case to modified behaviour
...
We throw instead of showing warning now
2023-03-29 09:25:20 +05:30
Saqib Ansari
32dbbb47bf
feat: redis cache decorator ( #20452 )
...
* feat: redis cache decorator
* fix: review changes
* fix: remove unintentional changes
* fix: remove unintentional changes
* refactor: cleanup and simplify code for redis
AIs suck
* fix: bug
* test: redis cache
* fix: remove unused import
* feat: make redis cache user specific
redis cache utils already support this, extending so everyone can use it
* feat: support @redis_cache without params
* test: flake in request site cache test
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-27 17:03:20 +05:30
Ankush Menat
dd2ac72a9a
fix: skip 0 for rounding
2023-03-13 14:16:39 +05:30
Ankush Menat
709edf1f55
fix: Make corrected bankers rounding default method
2023-03-13 13:10:51 +05:30