This lets us create three types of APIs:
- Document APIs that operate on documents
- DocType APIs that operate on collections - list, count, search
- Method APIs that are RPC calls
* refactor!: Drop handling for SQL queries
This hasn't been supported in really long time, no need to check that
use cases.
It will still fail but with no special error message.
* fix: Catch all import related errors
* fix!: Use last query from hooks
* refactor!: Return search results like any other function
Search results are returned in `results` key which is incosistent from
most other functions
* refactor: simplify search_link
Meta order in most cases is default "modified" which doesn't quite help.
idx is # of times a document is referred to somewhere else, which is
more likely to be relevant.
When `locate` returns 0 it's shown on top instead it should be shown
last or not shown at all.
This is math hack to avoid using any complex SQL functionality which
isn't allowed in DB query.
There are cases where certain social login keys
- Should not allow signups at all and only allow logins. E.g. social media login keys.
- Should allow signups even if global sign ups are disabled. e.g. internal SSO like setups.
| Metric | Before | After | Change |
| --- | --- | --- | --- |
| app.html first response size | 421kb | 106kb | -75% (!) |
| First response duration | 60ms | 40ms | -33% |
huge thanks to @cogk for doing most of the work for this PR on this issue: https://github.com/frappe/frappe/issues/17449#issuecomment-1728328726
Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
* feat: Add custom icons with the `app_include_icons` hook
These custom icons are available on the desk only. They can be picked in the `ControlIcon` picker.
Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
* fix: skip conf for including icons
* test: Fix test_include_icons
---------
Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Right now if you have if-owner rule on doctype then whatever you change
will only apply to last inserted rule because we don't check if-owner
value
Long term better fix: Identify with perm rule name instead of arbitrary
"primary keys" defined in code.
* reafctor: force ipv4 localhost
Replacing "localhost" with "127.0.0.1" in the codebase; sometimes the name localhost force-resolves to ipv6
* revert: leave localhost usage in oauth tests
Change not required.
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* Revert "chore: move function to correct file"
This reverts commit ebfdfa283b.
* Revert "refactor!: merge get_site_url into get_url (#22308)"
This reverts commit 2001bc278f.