Gavin D'souza
1b6c41cbfc
fix: Don't re-define pluck bug
...
Introduced via 974bf463df
2021-06-11 19:44:22 +05:30
Gavin D'souza
f92c5d9898
refactor: Unnecessary/illogical check
...
because cint(False) gives 0
2021-06-11 19:34:34 +05:30
Gavin D'souza
888aa8ad84
refactor(minor): DatabaseQuery.extract_tables
2021-06-11 19:34:24 +05:30
Gavin D'souza
ee75fb38cc
style: Restructured if blocks in db_query
2021-06-11 19:34:16 +05:30
Gavin D'souza
974bf463df
refactor: Simplify string representations
...
* Simplify existing %s, .format representations to f-string
* Simplify logic
* Remove redundant tokens
2021-06-11 19:34:00 +05:30
Gavin D'souza
c489846547
Merge branch 'develop' into unnecessary_comprehensions
2021-06-11 19:30:23 +05:30
Brian Pond
d8113698d1
bug: db_query.py
...
The object 'meta' does not always have the attribute 'is_submittable.'
This extra syntax checks for existence first.
2021-06-07 16:15:59 -07:00
Gavin D'souza
674c8cf77b
chore: Use get_absolute_url to doc.get_url
...
Avoid re-implementation to reduce interfaces for possible bugs/fixes
2021-06-07 12:09:22 +05:30
Gavin D'souza
6fb14120d9
fix: Remove trailing whitespace in translatable str
...
Simplify conditional block and str appending
2021-05-27 13:47:55 +05:30
Gavin D'souza
e2ee75e3cb
fix: Translate strings passed in frappe.throw
...
* Remove trailing whitespaces in translatable strings
* Sort imports appropriately
2021-05-27 13:47:21 +05:30
Gavin D'souza
eca30667d2
chore: Drop FileNotFoundError handling for PY2
2021-05-26 22:21:23 +05:30
Gavin D'souza
e407b78506
chore: Drop dead and deprecated code
...
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Akshay Kumar Tripathi
b0f1bbc378
fix: corrected the function get_url ( #13330 )
...
* Removed /Form from the function get_url
As per issue #12820 , I think /Form was causing a problem so I removed it. Now the get_url returns URL in the format: "app/doctype/name".
* fix: Change to f-strings
* Implement slug on get_url
* Removed slug for names
2021-05-26 05:07:50 +00:00
Joseph Marie Alba
c795a70897
Python 3 issue in re
...
Python 3 interprets string literals as Unicode strings, and therefore \d is treated as an escaped Unicode character.
Declare RegEx pattern as a raw string instead by prepending r or double escape \d
2021-05-16 05:52:05 +08:00
Prssanna Desai
4b0e627c94
Merge pull request #13203 from prssanna/custom-print-format-fix
...
fix: check if df exists in get_formatted
2021-05-13 12:14:37 +05:30
Ankush Menat
d8a4cf896b
perf: prefer set builder notation over constructor
2021-05-12 20:38:18 +05:30
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
...
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
prssanna
103fa1e31a
fix: check if df exists in get_formatted
2021-05-12 16:40:56 +05:30
Leela vadlamudi
2374290935
Merge pull request #13142 from shariquerik/revert-naming-fix
...
fix: Revert naming for custom naming series
2021-05-10 14:02:56 +05:30
gavin
a094cbee56
Merge pull request #12242 from gavindsouza/dont-call-dynamic-properties
...
fix: Don't evaluate dynamic properties to check if conflicts exist
2021-05-10 13:57:50 +05:30
shariquerik
9919ddff2a
fix: sider fix
2021-05-10 12:56:15 +05:30
shariquerik
e0efefd9e5
refactor: Used re.search also added examples
2021-05-10 12:54:04 +05:30
shariquerik
8995e8e9db
refactor: remove unnecessary code
2021-05-09 06:24:20 +05:30
shariquerik
e7552413b4
refactor: minor fix
2021-05-07 18:10:59 +05:30
Leela vadlamudi
4743a04a8e
Merge pull request #13121 from frappe/repr_doctype
...
feat(DX): Add simple __repr__ for DocTypes
2021-05-07 10:12:56 +05:30
leela
72ca7e9753
refactor: remove six dependency
2021-05-07 07:42:04 +05:30
Gavin D'souza
87ed7796de
fix: Use older logic to set module_name and custom vars
2021-05-06 16:56:50 +05:30
Gavin D'souza
877f9d08df
fix: Use fallback values if doctype values unset
2021-05-06 16:56:50 +05:30
Gavin D'souza
05712abc60
fix: Check for db value if cache doesn't exist
...
in get_controller, if cached value doesn't exist for a DocType in the
frappe.db.value_cache, then query the db as fallback before the final
fallback of assuming module as Core and non custom
2021-05-06 16:56:49 +05:30
shariquerik
483cd85eba
fix: Revert naming for custom naming series
2021-05-06 16:44:18 +05:30
Ankush Menat
adbf267212
feat(DX): Add __repr__ and __str__ for DocTypes
...
- Show doctype and name
- if docstatus != 0, show docstatus
- if child doctype, show parent
2021-05-05 19:45:33 +05:30
Hussain Nagaria
3e229e931a
test: Email and URL validate functions
2021-04-30 15:37:55 +05:30
Hussain Nagaria
82b98330fd
feat: Add URL option for data type fields
2021-04-14 20:16:44 +05:30
Deepesh Garg
a0fa3d0fd5
Merge branch 'develop' of https://github.com/frappe/frappe into if_owner_per_check_url
2021-04-12 21:24:19 +05:30
hasnain2808@gmail.com
e95f7d201a
fix: backwards compatibility
2021-04-07 11:15:34 +05:30
Saqib Ansari
a93c2caab2
fix: reverting of series with a variable
2021-04-06 20:48:33 +05:30
Deepesh Garg
8460ca851f
fix: filter list view based on owner
2021-04-03 16:12:26 +05:30
Suraj Shetty
cf607148a0
Merge pull request #12121 from zerodha/virtual_doctype
2021-04-02 12:43:43 +05:30
Suraj Shetty
efba586054
Merge branch 'develop' into remove-password
2021-04-02 09:46:57 +05:30
Faris Ansari
bcb01f6491
fix: Remove encrypted password when it is unset
2021-04-01 17:48:20 +05:30
Shridhar Patil
361cd935d6
Merge branch 'develop' into virtual_doctype
2021-04-01 09:46:35 +05:30
Suraj Shetty
7124e49473
Merge branch 'develop' into whitelist-methods
2021-03-31 20:42:37 +05:30
Sagar Vora
aed90126f3
fix: incorrect condition
2021-03-30 13:32:36 +05:30
Sagar Vora
497ea861f4
feat: frappe.whitelist for class methods
2021-03-30 13:07:58 +05:30
Rushabh Mehta
2248c6c410
fix(minor): lockdown frappe.client.get_list
2021-03-30 11:25:40 +05:30
Rushabh Mehta
c9b367933a
fix(minor): make group_by validation tighter
2021-03-29 23:16:33 +05:30
Rushabh Mehta
a2ffea53f2
fix(refactor): lockdown frappe.desk.reportview
2021-03-29 21:44:08 +05:30
Prssanna Desai
6df534a333
Merge pull request #12635 from prssanna/prepared-reports-deletion
2021-03-25 15:11:48 +05:30
prssanna
e40892fdb6
feat: flag to delete attached files permanently
2021-03-25 14:34:10 +05:30
prssanna
f97cc370cf
feat: flag to delete docs permanently
2021-03-25 14:34:10 +05:30