Commit graph

4953 commits

Author SHA1 Message Date
Ankush Menat
ccaf4c1e7e
Merge pull request #19854 from gavindsouza/get_all-virtual-dts
fix: Interface DatabaseQuery to virtual doctypes' get_list
2023-02-03 17:30:57 +05:30
Ritwik Puri
47edc63170
fix: support for different delimiter for timeline email linking (#19751) 2023-02-03 11:47:38 +05:30
Gavin D'souza
3cd781e316 Merge branch 'develop' into get_all-virtual-dts 2023-02-02 13:55:24 +05:30
Gavin D'souza
d50f6fa7b4 test: cleanup test_create_virtual_doctype 2023-02-02 13:42:29 +05:30
Ankush Menat
1b016d34bd
fix: misc migration related fixes (#19874)
* fix: ignore certain validations during migrate

These are recoverable after migration is completed, better to let update
go through first.

* fix: Let people set arbitrary Data field options

It will be treated as vanilla Data field by default but other apps can
chose to modify behaviour based on it.

AFAIK there is no real side effects of this.
2023-02-01 16:02:59 +05:30
Ankush Menat
338ccc5a2a
fix: sanitize form dict in error logs (#19835)
[skip ci]
2023-01-30 15:22:21 +05:30
Ankush Menat
1eab4e4253
fix: Convert doctype name to string (#19832) 2023-01-30 14:11:38 +05:30
Ritwik Puri
bc9ed4a422
chore: remove prepared report event from system settings controller (#19808)
[skip ci]
2023-01-27 14:19:05 +05:30
Gavin D'souza
d357af1533 refactor: Add a maxsplit limit to string splits 2023-01-24 19:22:51 +05:30
Ankush Menat
224ab37924 fix: Dont apply non-standard perms in migrate
ref: agent-job/b8bca95f25
2023-01-23 15:07:13 +05:30
Ritwik Puri
65a76cc0f3
Merge pull request #19083 from Aradhya-Tripathi/refactor-bg-submissions
fix: misc fixes (background submission)
2023-01-23 13:18:18 +05:30
phot0n
4144c45b2a fix: make job_id link field and allow all (if owner) to read their submission queues 2023-01-23 13:13:27 +05:30
phot0n
99fbe969e8 Revert "fix: workflow mechanics for submission queue (start)"
This reverts commit bb8b0d415e.
2023-01-23 12:57:20 +05:30
phot0n
af093dd598 fix: traceback with context for submission queue 2023-01-23 12:57:20 +05:30
phot0n
bb8b0d415e fix: workflow mechanics for submission queue (start) 2023-01-23 12:45:22 +05:30
phot0n
08c8ab0229 chore: better notification message
Co-authored-by: Aradhya-Tripathi
2023-01-23 12:45:22 +05:30
phot0n
64cb507fae chore: verbose confimation dialog message 2023-01-23 12:45:22 +05:30
Ankush Menat
2971fcf657
fix: misc migration related fixes (#19623)
* fix: Dont check for hidden-mandatory during migration

This is being added programatically and can be addressed later. No need
to fail migrations for this.

* refactor: Convert patch log naming to hash

Naming series isn't required and can cause collision if patches were
incorrectly executed or reattempted.
2023-01-20 11:43:21 +05:30
Ankush Menat
945a2b34fe
fix(UX): drag handles on app resolution order table (#19672)
[skip ci]

Co-Authored-By: Suraj Shetty <surajshetty3416@gmail.com>

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2023-01-20 11:35:15 +05:30
Ankush Menat
b483f27ae8
fix: only generate fieldname for inconsequential fields (#19663)
Creating columns that are altered in DB on save automatically is kinda
bad and will leave unnecessary columns in DB if user makes a mistake or
forgets to add a fieldname explicitly.

The default generated names are meaningless like "float_asdx", there is
no use case for this.

[skip ci]
2023-01-19 21:55:31 +05:30
jiangying
e324ad2094
chore(file): better error msg for file_upload (#19609)
* chore(file): better error msg for file_upload

current, if No `file` or `file_url` field set in form-data, err is cryptic:
```
172.19.0.1 - - [16/Jan/2023 16:52:27] "POST /api/method/upload_file HTTP/1.1" 403 -
Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1590, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/handler.py", line 221, in upload_file
    return frappe.get_doc(
  File "apps/frappe/frappe/model/document.py", line 305, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 327, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 253, in insert
    self.run_method("before_insert")
  File "apps/frappe/frappe/model/document.py", line 909, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1259, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1241, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 906, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/core/doctype/file/file.py", line 61, in before_insert
    self.set_file_name()
  File "apps/frappe/frappe/core/doctype/file/file.py", line 335, in set_file_name
    self.file_name = re.sub(r"/", "", self.file_name)
  File "/home/frappe/.pyenv/versions/3.10.5/lib/python3.10/re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
```

this pr make it understandable

* Update frappe/core/doctype/file/file.py

Co-authored-by: gavin <gavin18d@gmail.com>

* fix: SyntaxError

Co-authored-by: gavin <gavin18d@gmail.com>
2023-01-19 21:11:41 +05:30
Ankush Menat
fb2c6a5573
Merge pull request #19653 from ankush/modify_installed_orderig
feat: let users modify hook resolution order
2023-01-18 21:01:25 +05:30
Ankush Menat
c14379ce5c fix: log changes made to installed_apps order 2023-01-18 19:16:09 +05:30
Ankush Menat
1796cae6bf feat: let users modify hook resolution order
Since hook resolution depends on the order in which apps were installed
on site, it should be made configurable as escape hatch in case a
different resolution order is desired.

Keep in mind that changing order affects every hook, page, customization
so you can't pick and choose priority for individual hooks as of now.

Separate proposals are welcome for such configurabilty.
2023-01-18 18:45:33 +05:30
Shariq Ansari
1b4b6cce15 fix: Edit Profile link is not redirecting correctly 2023-01-18 10:30:40 +05:30
Suraj Shetty
551f58bde9
fix: Convert extension to lowercase before comparison 2023-01-17 16:32:44 +05:30
Ritwik Puri
75ae0fa248
chore: remove unnecessary query condition from get_other_system_managers (#19611) 2023-01-17 10:50:07 +05:30
phot0n
f6489a6de8 fix: allow submission queue doc reads from users if theyre owners
* only show unlock doc button to system managers
2023-01-13 12:57:32 +05:30
phot0n
12f0be1906 refactor(minor): better banner and removed unnecessary complexity for unlocking ref document 2023-01-13 12:57:32 +05:30
Aradhya
cffcb0fa17 refactor: failed attempts banner 2023-01-13 12:57:32 +05:30
Aradhya
1b46b0e347 fix: fixed status fetch and refactored message 2023-01-13 12:57:32 +05:30
Aradhya
4e8bbd6c93 refactor: allowing unlocking of doc when job id is not set 2023-01-13 12:57:32 +05:30
Shariq Ansari
bae711cff2 fix: changing documentation_url docfields type from Small Text to Data(URL) 2023-01-11 20:57:11 +05:30
Shariq Ansari
737fec7c26
Merge branch 'develop' into form-builder-fixes-1 2023-01-11 20:52:03 +05:30
Ankush Menat
41f8fb1a68
fix: Log settings - Handle validation failures (#19549)
There's only one sane way to get past validations - remove the rows, so
just do it instead of asking users to do it.

[skip ci]
2023-01-10 12:30:01 +05:30
gavin
cfc009f21a
feat: Useful Meta.__repr__ (#19479) 2023-01-05 10:50:23 +05:30
Shariq Ansari
80ceb33c01 fix: allow using login_with_email_link if user_pass_login is disabled
unrelated fix
2023-01-04 19:20:36 +05:30
Alfredo Altamirano
d0f880e5c5
fix: Improve JSON export format readability (#19429)
* Improve JSON export format readability

* fix: Enable ensure_ascii flag on export_json

* style: fmt

[skip ci]

Co-authored-by: Alfredo Altamirano <Ahuahuachi@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-01-04 12:33:45 +05:30
Ritwik Puri
b78452dc00
Merge pull request #19472 from ankush/set_value_bad
refactor: deprecate usage of set_value with None as docname
2023-01-04 11:44:57 +05:30
Ankush Menat
e00023deb1 refactor: replace bad usage of db.set_value 2023-01-04 11:13:53 +05:30
gavin
804f0336e1
Merge branch 'develop' into typing-001 2023-01-03 14:29:33 +05:30
Shariq Ansari
d84f6f249d
Merge pull request #19430 from frappe/fix-auto-enable-in-list-view 2023-01-02 15:40:36 +05:30
Ankush Menat
4d048cd651 fix: type hint for image view
closes https://github.com/frappe/frappe/issues/19426
2023-01-02 11:50:25 +05:30
Mohammad Hussain Nagaria
215e9dc2ef
Merge branch 'develop' into fix-auto-enable-in-list-view 2022-12-30 19:35:31 +05:30
Ankush Menat
b414fff09f
Merge pull request #19363 from shariquerik/login-without-password
feat: Login With Email Link
2022-12-30 14:05:39 +05:30
Hussain Nagaria
e96ce83343 test: not in list view by default for not allowed mandatory field types 2022-12-29 17:40:58 +05:30
Hussain Nagaria
f1553c479c fix(test): override fields of test doctype if passed 2022-12-29 16:20:07 +05:30
Hussain Nagaria
048de262fd fix: don't set default in list view for fields not allowed 2022-12-29 15:24:59 +05:30
Gavin D'souza
d13c377848 refactor: OAuth
* Added typing hints for Oauth APIs and dependant utils
* Simplify oauth core flows
* Remove long commented code
* Use newer, simpler syntax for better readability
2022-12-27 19:25:43 +05:30
Ritwik Puri
de525b2ef1
Merge pull request #19411 from phot0n/autoname-child-table
fix(minor): dont set autoincrement autoname by default for child table
2022-12-27 15:57:57 +05:30