Commit graph

2555 commits

Author SHA1 Message Date
Gavin D'souza
48c448160d refactor: Restructure File module
* Separate out utils, exceptions & core / maintain import paths [except
  API endpoints]
* Add type hints
* Simplify logic
2022-03-15 19:39:47 +05:30
Gavin D'souza
9b54e3d0c0 fix: Disallow sites to have file access beyond site folder 2022-03-15 19:39:47 +05:30
Ankush Menat
23b70df784 fix!: deprecate is_async=False usage outside of tests 2022-03-14 14:27:59 +05:30
ChillarAnand
b2fc959307 refactor: Clean up whitespace & add CI check 2022-02-25 20:01:29 +05:30
Suraj Shetty
1e4b592b45
Merge pull request #16011 from resilient-tech/remove-unused-flag 2022-02-24 14:43:24 +05:30
Suraj Shetty
64514da456
Merge branch 'develop' into remove-unused-flag 2022-02-23 14:28:22 +05:30
Ankush Menat
2c2d8b8e08 fix: explicitly ignore duplicates 2022-02-23 14:11:30 +05:30
HarryPaulo
f4518e2cf9
fix(print): Added properties page-width, page-height (#16045) 2022-02-23 13:49:40 +05:30
mergify[bot]
a7cd6003ce
fix: Wrap timeout getting for custom queues in function (backport #15933) (#16054)
Co-authored-by: Lev Vereshchagin <mail@vrslev.com>
Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
2022-02-22 10:26:42 +05:30
barredterra
745297a49d refactor: a not in b
Search: if not ([\w\d]*?) in ([\w\d]*?)
Replace: if $1 not in $2
2022-02-21 19:54:34 +01:00
mergify[bot]
8a7b9ca77f
Merge pull request #15877 from gavindsouza/migrate-refactor
refactor: Site Migration
2022-02-21 09:06:52 +00:00
Sagar Vora
0f95c2716d fix: incorrect function name in call 2022-02-17 10:50:31 +05:30
Sagar Vora
de22bd6297 fix: improved validation 2022-02-17 10:35:15 +05:30
Sagar Vora
4c403333c4 fix: remove unused flag in_setup_help 2022-02-16 16:02:37 +05:30
mergify[bot]
b47a299f30
Merge pull request #15927 from gavindsouza/test_api-refactor
refactor: API Testing Suite
2022-02-15 12:23:56 +00:00
Gavin D'souza
d72aeca18f chore!: Deprecate frappe.utils.minify
* Remove dead code from build.py
* Whitespaces & imports style fixes
2022-02-11 20:22:56 +05:30
Gavin D'souza
8b01c04a75 chore: Add type hints 2022-02-11 13:18:24 +05:30
Gavin D'souza
188373b1eb refactor(test): Frappe REST Test Suite
* Use Werkzeug Test Client instead of requests
    This change should start tracking coverage for the `api` module.
    Committing to ensure state maintainence will not be necessary.
* Refactor get_test_client to reset locals on each request
* Separate FrappeAPITestCase to enable formation of a generic API testing engine.
2022-02-09 17:02:40 +05:30
Saqib Ansari
6e0c4946f1 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-02-09 10:43:34 +05:30
phot0n
b31f3c24f6 refactor: remove parent, parenttype, parentfield, idx columns from non-child table doctypes
* feat: add parent, parenttype, idx, parentfield columns to doctypes when transitioning from normal -> child table

* fix: remove parent, parenttype, parentfield, idx from DocType DocType
2022-02-07 15:12:37 +05:30
Suraj Shetty
68d934ae0f
Merge branch 'develop' into link_title_refactor 2022-02-04 14:53:26 +05:30
Gavin D'souza
ad1fedf4a8 fix: Return correct types for time utils 2022-02-02 19:46:09 +05:30
Gavin D'souza
885c86bedb Merge branch 'develop' of github.com:frappe/frappe into set_value-refactor 2022-01-31 11:53:59 +05:30
Ankush Menat
eda052529b
fix: calling non-exisitng unescape method on HTML2Text (#15796)
test: xlsxutils
2022-01-30 12:17:02 +05:30
Gavin D'souza
5b6ceb5543 Merge branch 'develop' of github.com:frappe/frappe into set_value-refactor 2022-01-28 18:39:12 +05:30
Gavin D'souza
1811f464a9 Merge branch 'set_value-refactor' into set_value-refactor 2022-01-28 18:38:46 +05:30
Gavin D'souza
8037866dc1 fix: Handle parsing and formatting timedeltas
* Added utils parse_timedelta, format_timedelta
* Added to json_handler for de-serializing timedelta objects
2022-01-28 18:33:03 +05:30
Faris Ansari
bf19ebdeb6
fix(boilerplate): add .gitkeep in public folder (#15765)
add .gitkeep file so that public folder is committed to git this is
needed because if public doesn't exist, bench build doesn't
symlink the public folder to sites/assets
2022-01-27 19:17:41 +05:30
Ankush Menat
fd227d38f4
feat: post model-sync patches (#15351)
Ability to run a few patches after the doctype model schema is synced.

Read module-level docstring of patch_handler.py for more info.
2022-01-26 11:21:30 +05:30
Shariq Ansari
54b3a32968 fix: get timezone in user_info 2022-01-25 16:19:49 +05:30
saxenabhishek
efd5c197cb fix: sbool converting int stored as string 2022-01-25 03:07:34 +05:30
mergify[bot]
1d06077d35
Merge pull request #15639 from alyf-de/is_bool
refactor: use `is bool` instead of `== bool`
2022-01-24 11:30:02 +00:00
mergify[bot]
a053e8b33c
fix: allow custom queues (backport #15653) (#15667)
* fix: allow custom queues

(cherry picked from commit ab7077dd31c854f5a739f1a1a653e0fbffb2c53c)

* fix: remove site config and reformat the code

(cherry picked from commit b3e11c01ee08533e8ce151873e974730b16f26f7)

* fix: remove redundant code

(cherry picked from commit 51ae9a57fde9276877ef47a22d3a468a3fcfb479)

Co-authored-by: Lucas Vazquez <lucas5zvazquez@gmail.com>
2022-01-20 09:34:32 +00:00
Saqib Ansari
ea3ec5e2a7 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-01-18 09:52:30 +05:30
barredterra
dac9349aef refactor: use is bool instead of == bool 2022-01-17 15:40:33 +01:00
Gavin D'souza
429f839ea3 style: Add typing, sorted imports# 2022-01-17 15:31:37 +05:30
barredterra
b1383df15a refactor: use is None instead of == None 2022-01-17 10:37:51 +01:00
Gavin D'souza
b403d67845 fix!: Don't use strtobool in sbool util
strtobool would convert 't', 'yes' to True too. Which shouldn't be a
problem generally but could be one possibly.
2022-01-17 14:55:36 +05:30
Gavin D'souza
227dc26707 Merge branch 'develop' of github.com:frappe/frappe into set_value-refactor 2022-01-17 14:04:13 +05:30
Saqib Ansari
30ba577c0a Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-01-14 15:20:56 +05:30
Rushabh Mehta
0486cde0a5
Merge pull request #15606 from rmehta/fix-user-info
fix: load user_info on-demand
2022-01-14 09:58:28 +05:30
Suraj Shetty
645f23a9a7 fix: Add toggle theme as standard dropdown option
- For new sites toggle theme was not available. It was added via patch for old sites.
2022-01-13 19:45:48 +05:30
Rushabh Mehta
545a3a3ac4 fix(minor): handle for illegal user 2022-01-13 18:49:18 +05:30
Rushabh Mehta
853287f49d fix: load user_info on-demand 2022-01-13 16:39:24 +05:30
Gavin D'souza
f5072af00d fix: sbool before cint in cast for Check types
Noticed an issue when get_single_value wasn't returning the correct
values; by converting true to 0.

Tested it out. Here's the examples:

In [2]: sbool("2")
Out[2]: '2'

In [3]: cint(sbool("2"))
Out[3]: 2

In [4]: cint(sbool("-1"))
Out[4]: -1

In [5]: cint(sbool("0"))
Out[5]: 0

In [6]: cint(sbool("1000"))
Out[6]: 1000

In [7]: cint(sbool("10_000"))
Out[7]: 10000

In [8]: cint(sbool("true"))
Out[8]: 1
2022-01-11 12:57:23 +05:30
Gavin D'souza
6aa9a0bef5 style: Sorted imports & whitespace consistency 2022-01-07 20:44:51 +05:30
Saqib Ansari
d7aa7ac762 refactor: format multiselect table fields based on fieldtype 2022-01-07 20:15:55 +05:30
Saqib Ansari
06b00e8e01 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-01-07 16:01:44 +05:30
Gavin D'souza
981564e544 Merge branch 'develop' into frappe-postgres-changes 2022-01-07 11:37:28 +05:30
Conor
55392b64e7 fix: Revert changes made to fix collation differences
Due to collation differences in MariaDB and Postgres, tests gave
inconsistent results. This was to be handled in tests alone instead of
the application. It was unnecessary. Collation changes should be made at DBMS config
level only. Accomodating for those in the application will unnecessarily
degrade performance for everyone.

Other changes:
* use pluck in user_type
* revert ordering in nestedset
* revert parsing in order_field
* use preferred APIs & styling

Co-authored-by: gavin <gavin18d@gmail.com>
2022-01-07 10:45:10 +05:30