We shouldn't do a distinct count on primary key, as it is not required, and is also slow. See below query run times.
MariaDB [c6b2c772b91fd3d8]> select count(distinct name) from `tabStock Ledger Entry`;
+----------------------+
| count(distinct name) |
+----------------------+
| 3268372 |
+----------------------+
1 row in set (14.65 sec)
MariaDB [c6b2c772b91fd3d8]> select count(name) from `tabStock Ledger Entry`;
+-------------+
| count(name) |
+-------------+
| 3268372 |
+-------------+
1 row in set (0.24 sec)
there is no need to prepend the sitename to the url, since browsers/html are/is smart enough to handle absolute urls.
Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
* fix(reportview): cast docname to string
explicitly cast docnames to string to fix sorting in reportview.py:217
Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
* fix: codacy changes
i hate codacy.
* fix(reportview): remove redundant safe_decode call
chat profile should be renamed when user renames their email id, else the chat profile won't be found
Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
* fix: Validate length for int and bigint column types
* fix: skip standard fields
* fix: Skip Check fields as well
Value of Check fields can be True or False, which are casted to 0 or 1 explicitly
* Set modified and created value while creating user permissions
* Add patch to set missing creation and modified value
* Pass dict with value to the query
* Fix query
* Use now instead of now_datetime
* Set actual creation and modified of user permission
* Remove unwanted import
* Remove bad, useless, garbage code
* feat: provision to enable/disable prepared report from permission for page and report document
* Added progress bar in the report
* Removed cache and fixed message
* Show progress bar if execution time is greater than 2 seconds