Commit graph

23788 commits

Author SHA1 Message Date
Shivam Mishra
63856f6a70 refactor: use agent style for details & summary 2020-03-16 16:13:01 +05:30
Suraj Shetty
bb9401d249
Merge pull request #9512 from scmmishra/setup-wizard-dev
refactor: improvements for setup_wizard
2020-03-16 08:51:40 +05:30
Suraj Shetty
98f5366fac
fix: Remove duplicate on_trash key 2020-03-14 16:16:16 +05:30
dependabot-preview[bot]
b3b94197a1
chore(deps): [security] bump acorn from 5.7.3 to 5.7.4 (#9695)
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-14 12:43:49 +05:30
mergify[bot]
ef8a95ec55
Merge pull request #9674 from nextchamp-saqib/no_currency_field_found
fix: currency field not found in print formats
2020-03-13 15:05:57 +00:00
Suraj Shetty
be04015ddd
Merge branch 'develop' into no_currency_field_found 2020-03-13 16:08:14 +05:30
Aditya Hase
839114b7ff
fix: Add db-password option to new-site (#9685) 2020-03-13 15:10:59 +05:30
gavin
6a25a33d49
fix: delete as much indexes from each table (#9684)
in cases of customization, errors such as pymysql.err.InternalError: (1091, "Can't DROP 'unique_item'; check that column/key exists") may rise up
2020-03-13 15:02:47 +05:30
Andy Zhu
fcdb923d2e
fix: Missing bucket name check (#9546)
* fix: missing bucket name check when user make changes on s3 backup setting

Problem: If the user changed the backup limit, then press save. The validate function will give an error message that the bucket name already exists. It would be inconvenient for the user to use a different bucket name to save any changes.

So I implemented a flag ''bucket_name_exist'' to indicate if the bucket name exists, if not, then go to the flow of trying to create a bucket.

* fix: extra line removed

* fix: Use head_bucket Boto3 API 

1. Head_bucket will return 200 Ok if the bucket exists and you have permission to access it.
2. Error code 403 Forbidden, Error code 404 Not Found.
3. Use bucket_name_exist to check if need to create bucket.

Thanks @Mangesh-Khairnar suggestions.
Reference: 
1. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.head_bucket
2. https://boto3.amazonaws.com/v1/documentation/api/latest/guide/migrations3.html#accessing-a-bucket

Further improvements:
1. Use 'GET' Requestion to check if the Access Key ID and Secret Access Key is valid (Because AWS tier has 20,000 GET requests while only 2,000 LIST requests)
2. Edge case on Error prompts when head_bucket returns an error code other than '403' or '404'.

* fix: add an extra line to align with original code style

* Update frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py

Co-Authored-By: Chinmay Pai <chinmaydpai@gmail.com>

* fix: remove the flag and redundant exception

When we got a 404 error, we can just create the bucket as 1. The bucket name does not exist in the current bucket. 2. we have permission to access the bucket.

* Update frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py

Co-Authored-By: Himanshu <himanshuwarekar@yahoo.com>

* Update frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py

Co-Authored-By: Chinmay Pai <chinmaydpai@gmail.com>

* fix: missing handling the error code '400' - 'Bad Request'

* fix: applied with DeepSource analysis

1. Lines too long
2. Doc Lines too long
3. Expected 2 blank lines between class and method
4. Unused variable removed

Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
2020-03-13 13:06:36 +05:30
Shivam Mishra
1e1cc1b6c0
fix(dashboard chart): Hide filters if hide_actions is set (#9679)
* refactor: remove print statement

* fix: hide filters if hide_actions is set

* refactor (cyoress): wait after clearing field

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-03-13 11:57:34 +05:30
mergify[bot]
280cdd5ade
Merge pull request #9659 from prssanna/minimizable-dialog
feat: add flag is_minimizable to msgprint and throw
2020-03-12 17:40:31 +00:00
Suraj Shetty
6b2dd7ca00
Merge branch 'develop' into setup-wizard-dev 2020-03-12 20:11:14 +05:30
Suraj Shetty
b937311ab3
chore(mergify): configuration update (#9682) 2020-03-12 20:07:27 +05:30
Suraj Shetty
36fcce76c1
Merge branch 'develop' into minimizable-dialog 2020-03-12 19:21:27 +05:30
Nabin Hait
1d6c3a9acd
fix: Run dashboard patch if table already exists (#9678) 2020-03-12 18:58:47 +05:30
Suraj Shetty
52eb708cc5
style: Remove extra space 2020-03-12 18:42:05 +05:30
Suraj Shetty
aa854e9a54
Merge branch 'develop' into minimizable-dialog 2020-03-12 18:40:54 +05:30
Suraj Shetty
2233235ec2
fix: duplicate entry error while renaming item (#9651)
Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2020-03-12 18:38:45 +05:30
Suraj Shetty
0088f27f71
Merge branch 'develop' into setup-wizard-dev 2020-03-12 18:29:31 +05:30
Suraj Shetty
1c5ee05300
Revert __init__.py 2020-03-12 18:27:29 +05:30
Shivam Mishra
fbcd034710
Merge pull request #9677 from scmmishra/desk-improvements
feat: desk improvements
2020-03-12 17:55:48 +05:30
Shivam Mishra
432d5842a4 fix (linting): added semicolon 2020-03-12 17:25:18 +05:30
Shivam Mishra
8d0f026eeb refactor: return promise explicitly 2020-03-12 17:10:27 +05:30
Shivam Mishra
5f47f2dd36 refactor: minor improvements 2020-03-12 16:41:56 +05:30
Shivam Mishra
ec36479b6a refactor: merge custom reports and doctype 2020-03-12 16:41:42 +05:30
Shivam Mishra
6461a01fc5 feat: update doctype 2020-03-12 16:33:37 +05:30
Shivam Mishra
6a953e6801 feat: allow extending pages 2020-03-12 16:27:37 +05:30
Shivam Mishra
85c436ac1b feat: updated client script 2020-03-12 16:27:25 +05:30
mergify[bot]
41f5dfc120
Merge pull request #9672 from sahil28297/fix_gsuite_develop
fix(GSuite): remove deprecated GSuite doctypes
2020-03-12 09:45:03 +00:00
Saqib Ansari
3389042656 fix: currency field not found in print formats 2020-03-12 14:33:50 +05:30
Shivam Mishra
52bf52790d refactor: desk page update handling 2020-03-12 14:25:25 +05:30
mergify[bot]
2cc95c4566
Merge pull request #9669 from Mangesh-Khairnar/fix-webform-list
fix: create option to load more entries
2020-03-12 08:54:53 +00:00
Shivam Mishra
bdb34ea006 feat: update is_standard for integrations page 2020-03-12 11:32:00 +05:30
Shivam Mishra
639e105ec2 refactor: filter shortcuts based on domains 2020-03-12 11:31:48 +05:30
Shivam Mishra
1c68e4582d refactor: page update logic 2020-03-12 11:31:25 +05:30
Shivam Mishra
fdd4a94fe2 feat: add restrict to domain in cards 2020-03-12 11:31:10 +05:30
Shivam Mishra
d3b0df0d40 feat: set is_standard 2020-03-12 11:31:00 +05:30
mergify[bot]
613eaea689
Merge pull request #9649 from Thunderbottom/no-mariadb-socket
feat(db): add new-site flag to use tcp/ip instead of unix socket
2020-03-11 20:29:49 +00:00
Sahil Khan
77e66272bc fix(GSuite): remove deprecated GSuite doctypes 2020-03-11 20:53:56 +05:30
Chinmay D. Pai
ca7fc2c17d
chore: delete user on the unix socket as well
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-11 18:23:20 +05:30
lijiming
4195928090
fix: mismatched translation key (#9667) 2020-03-11 17:59:16 +05:30
Shivam Mishra
fcb5470151 fix: use tabs 2020-03-11 12:32:40 +05:30
Mangesh-Khairnar
7d6957952e fix: do not pass empty values to the filter 2020-03-11 00:11:59 +05:30
Mangesh-Khairnar
303ba2daa3 fix: create option to load more entries 2020-03-10 23:55:31 +05:30
mergify[bot]
c43bddd8d8
Merge pull request #9662 from Thunderbottom/workflow-mail-fix
fix: correctly pickle email_args for workflow emails
2020-03-09 13:00:34 +00:00
mergify[bot]
5da7503efa
Merge pull request #9644 from netchampfaris/preview-email-iframe
fix: Render email preview in an iframe
2020-03-09 12:51:44 +00:00
Shivam Mishra
98d3533c2c
fix: UI tests (#9664)
* fix: fallback for default desk page

* fix: return if reference name does not exist

* refactor: rename to Query Report

* refactor: codacy linting fixes

* refactor: null check for data in workspace

* feat: enable cypress recording

* chore: codacy linting fixes

* refactor: don't set route explicitly

* fix (cypress): wait for request to be complete in grid pagination test

* fix (cypress): explicitly return async calls

* refactor: visit new_form directly

* refactor: skip some scripts for ui tests

* Revert "refactor: skip some scripts for ui tests"

This reverts commit 1e46e3cd5361c2910d25efb244774d153511af53.
2020-03-09 12:30:59 +00:00
Chinmay D. Pai
9d36b05804
fix: correctly pickle email_args for workflow emails
currently, since we return possible actions as dict_values, pickle fails
to work with it with the following error:

```python-traceback
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 99, in execute_job
    method(**kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/workflow/doctype/workflow_action/workflow_action.py", line 210, in send_workflow_action_email
    enqueue(method=frappe.sendmail, queue='short', **email_args)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 69, in enqueue
    kwargs=queue_args)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 258, in enqueue_call
    job = self.enqueue_job(job, at_front=at_front)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 324, in enqueue_job
    job.save(pipeline=pipe)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 516, in save
    connection.hmset(key, self.to_dict(include_meta=include_meta))
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 469, in to_dict
    obj['data'] = zlib.compress(self.data)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 234, in data
    self._data = dumps(job_tuple)
TypeError: can't pickle dict_values objects
```

passing the values as a list instead works fine.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-07 18:06:02 +05:30
prssanna
a9fcbf83d5 fix: use same flag name 2020-03-06 21:42:44 +05:30
prssanna
ca815a8776 feat: add flag minimizable to msgprint and throw 2020-03-06 21:40:51 +05:30