The current code raises a NameError which is never logged.
[flake8](http://flake8.pycqa.org) testing of https://github.com/frappe/frappe on Python 3.8.0
$ __flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics__
```
./frappe/data_migration/doctype/data_migration_run/data_migration_run.py:417:63: F821 undefined name 'e'
self.update_log('pull_failed', {migration_id_value: cstr(e)})
^
./frappe/patches/v5_0/fix_email_alert.py:12:37: F821 undefined name 'email_alert'
notification.days_in_advance = -email_alert.days_in_advance
^
2 F821 undefined name 'e'
2
```
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
No need to force set filters from URL Args
It is already set in the method `set_route_filters` to the Query Report's model
Currently if there are URL Arguments then even if you change the filters in the report view, the URL Args will override them.
formataddr[1] by default encodes non-ascii characters to `=?utf-8?q`, which needs to be decoded to a human-readable string format. using decode_header and make_header we can decode the string back to human-readable format.
before:
In [1]: formataddr(("Tèst", "notifications@erpnext.com"))
Out[1]: '=?utf-8?b?VMOoc3Q=?= <notifications@erpnext.com>'
after:
In [2]: make_header(decode_header(formataddr(("Tèst", "notifications@erpnext.com"))))
Out[2]: 'Tèst <notifications@erpnext.com>'
references:
[1]: https://docs.python.org/3/library/email.utils.html#email.utils.formataddr
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* fix: tags patch
* fix: auto_commit_on_many_writes
* fix: check if tag exists
* fix: check if tag or tag link exists
* fix: check if column exists
* fix: set autocommit false
* fix: use ignore in insert query for bulk insert
* fix: add option to ignore duplicates