8000 fix: attribute error on export of reports with additional columns by ruthra-kumar · Pull Request #19105 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: attribute error on export of reports with additional columns #19105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ruthra-kumar
Copy link
Member

Exporting Custom reports with Duration field gives attribute error.

scr1.mp4

@ruthra-kumar ruthra-kumar requested review from a team and phot0n and removed request for a team December 5, 2022 04:59
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Dec 5, 2022
@codecov
Copy link
codecov bot commented Dec 5, 2022

Codecov Report

Merging #19105 (8db8f57) into develop (3fd5b37) will decrease coverage by 0.21%.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #19105      +/-   ##
===========================================
- Coverage    63.64%   63.42%   -0.22%     
===========================================
  Files          750      750              
  Lines        67683    68471     +788     
  Branches      6039     6039              
===========================================
+ Hits         43074    43431     +357     
- Misses       21155    21586     +431     
  Partials      3454     3454              
Flag Coverage Δ
server-mariadb 67.60% <0.00%> (+0.03%) ⬆️
server-postgres 67.62% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@phot0n
Copy link
Contributor
phot0n commented Dec 5, 2022

can we just do col.get("fieldname")? in this case we'd be converting all the cols to frappe._dict just for getting the fieldname (?)

@ruthra-kumar ruthra-kumar force-pushed the attribute_error_on_rpt_exportw_with_new_columns branch from 70e6edd to 8db8f57 Compare December 5, 2022 08:04
@ruthra-kumar
Copy link
Member Author
ruthra-kumar commented Dec 5, 2022

can we just do col.get("fieldname")? in this case we'd be converting all the cols to frappe._dict just for getting the fieldname (?)

It was mostly for handling the different programming pratices. I've seen . and get used interchangebly on few places. Even here, its checking for python 'dict' type, which doesn't support . operator. But, uses . operator to access an element.

I've changed it to get for now.

@phot0n phot0n merged commit 90a4c93 into frappe:develop Dec 5, 2022
@phot0n phot0n added backport version-14-hotfix backport to version 14 and removed add-test-cases Add test case to validate fix or enhancement labels Dec 5, 2022
mergify bot pushed a commit that referenced this pull request Dec 5, 2022
phot0n added a commit that referenced this pull request Dec 5, 2022
…-19105

fix: attribute error on export of reports with additional columns (backport #19105)
@ruthra-kumar
Copy link
Member Author

@phot0n Can you trigger a v13 backport as well.

ruthra-kumar added a commit that referenced this pull request Dec 6, 2022
frappe-pr-bot pushed a commit that referenced this pull request Dec 6, 2022
# [14.18.0](v14.17.1...v14.18.0) (2022-12-06)

### Bug Fixes

* attribute error on export of reports with additional columns ([#19105](#19105)) ([2b43d5b](2b43d5b))
* check for bad zip files during unzipping in file doctype ([#19058](#19058)) ([#19060](#19060)) ([96c928e](96c928e))
* **db_query:** Disallow usage of certain functions in *_by ([#18981](#18981)) ([#19135](#19135)) ([5376755](5376755))
* **db_query:** Space resilient sanitization (backport [#18996](#18996)) ([#19045](#19045)) ([ab8422f](ab8422f))
* disable signups by default (backport [#19114](#19114)) ([#19118](#19118)) ([3dd2775](3dd2775))
* do not escape undefined txt ([86267e9](86267e9))
* empty search shows `None` ([#19055](#19055)) ([#19057](#19057)) ([1cd0bc2](1cd0bc2))
* ensure correct parenttype when retrieving roles ([af55da9](af55da9))
* give more weight to sequential matches ([#19121](#19121)) ([#19122](#19122)) ([16f642f](16f642f))
* ignore empty/`None` scripts ([#19111](#19111)) ([#19113](#19113)) ([2a96757](2a96757))
* keep actions on right ([7d3e47b](7d3e47b))
* LDAP - check each email in list before creating user ([250f787](250f787))
* only check for special characters in fieldname ([#19061](#19061)) ([#19065](#19065)) ([de0facc](de0facc)), closes [#18965](#18965)
* only System Manager can access Google Drive ([05be9ee](05be9ee))
* Optimize check field type is tab break if the doctype has a workflow ([#18858](#18858)) ([d9ce6c1](d9ce6c1))
* site creation using non-root users ([#19014](#19014)) ([#19043](#19043)) ([844e744](844e744))
* socketio spawn error ([#19070](#19070)) ([#19071](#19071)) ([75a54eb](75a54eb))
* type conversion for read receipt in communication email ([e0f7dd4](e0f7dd4))
* use permtype from passed arguments in has_web_form_permission when applying document permissions ([91c99d2](91c99d2))
* use webform doctype rather than allowing user to pass any doctype ([2be3178](2be3178))
* **UX:** freeze on delete ([#19094](#19094)) ([dd4791a](dd4791a))
* **UX:** Make fetch_from read_only if fetch_is_empty is not set ([#19025](#19025)) ([#19041](#19041)) ([feed227](feed227))
* Widget control on dashboard chart breaks on smaller screens ([d6dedca](d6dedca))

### Features

* **workers:** many small RQ worker features (backport [#18995](#18995)) ([#19046](#19046)) ([37dbada](37dbada))
phot0n pushed a commit that referenced this pull request Dec 8, 2022
…9105) (#19119)

(cherry picked from commit 90a4c93)

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
frappe-pr-bot pushed a commit that referenced this pull request Dec 13, 2022
# [13.46.0](v13.45.3...v13.46.0) (2022-12-13)

### Bug Fixes

* attribute error on export of reports with additional columns ([#19105](#19105)) ([#19119](#19119)) ([da28290](da28290))
* do not rename select field options and values on doctype rename ([#19223](#19223)) ([#19225](#19225)) ([47f5fd0](47f5fd0))
* **docshare:** return None if share_name and value are None ([#19187](#19187)) ([#19188](#19188)) ([4e2620a](4e2620a))
* log unknown usernames too for failed attempts ([#19199](#19199)) ([#19200](#19200)) ([a75fa10](a75fa10))
* only make fetch_from field read only if no input (backport [#19192](#19192)) ([#19194](#19194)) ([994c1ed](994c1ed))
* reload shared dialog upon checking any perm (backport [#19196](#19196)) ([#19197](#19197)) ([fd44b34](fd44b34))
* set-config -g ([#19217](#19217)) ([#19218](#19218)) ([458707e](458707e))
* stabilize shared with dialog (backport [#19170](#19170)) ([#19185](#19185)) ([4f9d755](4f9d755))
* unscrub and translate field names in tooltip explaining fetch from (backport [#19143](#19143)) ([#19173](#19173)) ([fc430d1](fc430d1))
* **UX:** forget password shows error on wrong email ([#19235](#19235)) ([#19239](#19239)) ([5257ca7](5257ca7))
* workflow icon not visible in mobile view ([dcb3933](dcb3933))

### Features

* allow user to pick all columns ([#19236](#19236)) ([927b264](927b264))
* finer frappe Recorder control with decorator (backport [#19220](#19220)) ([#19221](#19221)) ([3b18e7e](3b18e7e))
* inter-process file locks ([#19133](#19133)) ([#19145](#19145)) ([b34e8ce](b34e8ce))

### Performance Improvements

* remove order_by from linked_with chec
8000
ks ([#19229](#19229)) ([#19242](#19242)) ([c2cde0c](c2cde0c))
SaiFi0102 pushed a commit to ParaLogicTech/frappe that referenced this pull request Dec 16, 2022
SaiFi0102 pushed a commit to ParaLogicTech/frappe that referenced this pull request Dec 16, 2022
# [14.18.0](frappe/frappe@v14.17.1...v14.18.0) (2022-12-06)

### Bug Fixes

* attribute error on export of reports with additional columns ([frappe#19105](frappe#19105)) ([2b43d5b](frappe@2b43d5b))
* check for bad zip files during unzipping in file doctype ([frappe#19058](frappe#19058)) ([frappe#19060](frappe#19060)) ([96c928e](frappe@96c928e))
* **db_query:** Disallow usage of certain functions in *_by ([frappe#18981](frappe#18981)) ([frappe#19135](frappe#19135)) ([5376755](frappe@5376755))
* **db_query:** Space resilient sanitization (backport [frappe#18996](frappe#18996)) ([frappe#19045](frappe#19045)) ([ab8422f](frappe@ab8422f))
* disable signups by default (backport [frappe#19114](frappe#19114)) ([frappe#19118](frappe#19118)) ([3dd2775](frappe@3dd2775))
* do not escape undefined txt ([86267e9](frappe@86267e9))
* empty search shows `None` ([frappe#19055](frappe#19055)) ([frappe#19057](frappe#19057)) ([1cd0bc2](frappe@1cd0bc2))
* ensure correct parenttype when retrieving roles ([af55da9](frappe@af55da9))
* give more weight to sequential matches ([frappe#19121](frappe#19121)) ([frappe#19122](frappe#19122)) ([16f642f](frappe@16f642f))
* ignore empty/`None` scripts ([frappe#19111](frappe#19111)) ([frappe#19113](frappe#19113)) ([2a96757](frappe@2a96757))
* keep actions on right ([7d3e47b](frappe@7d3e47b))
* LDAP - check each email in list before creating user ([250f787](frappe@250f787))
* only check for special characters in fieldname ([frappe#19061](frappe#19061)) ([frappe#19065](frappe#19065)) ([de0facc](frappe@de0facc)), closes [frappe#18965](frappe#18965)
* only System Manager can access Google Drive ([05be9ee](frappe@05be9ee))
* Optimize check field type is tab break if the doctype has a workflow ([frappe#18858](frappe#18858)) ([d9ce6c1](frappe@d9ce6c1))
* site creation using non-root users ([frappe#19014](frappe#19014)) ([frappe#19043](frappe#19043)) ([844e744](frappe@844e744))
* socketio spawn error ([frappe#19070](frappe#19070)) ([frappe#19071](frappe#19071)) ([75a54eb](frappe@75a54eb))
* type conversion for read receipt in communication email ([e0f7dd4](frappe@e0f7dd4))
* use permtype from passed arguments in has_web_form_permission when applying document permissions ([91c99d2](frappe@91c99d2))
* use webform doctype rather than allowing user to pass any doctype ([2be3178](frappe@2be3178))
* **UX:** freeze on delete ([frappe#19094](frappe#19094)) ([dd4791a](frappe@dd4791a))
* **UX:** Make fetch_from read_only if fetch_is_empty is not set ([frappe#19025](frappe#19025)) ([frappe#19041](frappe#19041)) ([feed227](frappe@feed227))
* Widget control on dashboard chart breaks on smaller screens ([d6dedca](frappe@d6dedca))

### Features

* **workers:** many small RQ worker features (backport [frappe#18995](frappe#18995)) ([frappe#19046](frappe#19046)) ([37dbada](frappe@37dbada))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0