-
Notifications
You must be signed in to change notification settings - Fork 3
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
Setting Employee Mapping error, resolving and export exception decorator #445
Conversation
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #445 +/- ##
==========================================
+ Coverage 94.99% 95.14% +0.15%
==========================================
Files 47 49 +2
Lines 4574 4633 +59
==========================================
+ Hits 4345 4408 +63
+ Misses 229 225 -4
|
|
|
|
|
|
apps/netsuite/exceptions.py
Outdated
logger.exception('Something unexpected happened workspace_id: %s %s', task_log.workspace_id, task_log.detail) | ||
|
||
|
||
def update_last_export_details(workspace_id): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be present in actions.py
apps/netsuite/exceptions.py
Outdated
workspace_id=workspace_id, | ||
task_id='PAYMENT_{}'.format(entity_object['unique_id']), | ||
defaults={ | ||
'status': 'IN_PROGRESS', | ||
'type': 'CREATING_VENDOR_PAYMENT' | ||
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent is off
apps/netsuite/exceptions.py
Outdated
if payment: | ||
logger.info( | ||
'NetSuite Credentials not found for workspace_id %s', | ||
workspace_id | ||
) | ||
detail = { | ||
'message': 'NetSuite Account not connected' | ||
} | ||
task_log.status = 'FAILED' | ||
task_log.detail = detail | ||
|
||
task_log.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why special treatment for payment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the payment function there is no expense_group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also the Error Model needs expense_group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can assign expense_group = None inside 55 line block and then in __handle_netsuite_connection_error(), check for expense_group existence and update or create things
apps/netsuite/exceptions.py
Outdated
if not payment: | ||
all_details[0]['expense_group_id'] = expense_group.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this info isn't needed, can remove it off
apps/netsuite/exceptions.py
Outdated
expense_group.workspace_id | ||
) | ||
detail = { | ||
'expense_group_id': expense_group.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed, can treat payment and exports same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
* category mapping error settings and resolution * test added * Setting tax mapping and resolve (#447) * Setting tax mapping and resolve * resolved comments * Setting and Resolving Netsuite Error (#448) * Setting Netsuite Error * resolving netsuite error * setting netsuite error resolved * comment resolved --------- Co-authored-by: Ashutosh619-sudo <[email protected]> --------- Co-authored-by: Ashutosh619-sudo <[email protected]> --------- Co-authored-by: Ashutosh619-sudo <[email protected]>
|
|
apps/netsuite/exceptions.py
Outdated
if payment: | ||
logger.info( | ||
'NetSuite Credentials not found for workspace_id %s', | ||
workspace_id | ||
) | ||
detail = { | ||
'message': 'NetSuite Account not connected' | ||
} | ||
task_log.status = 'FAILED' | ||
task_log.detail = detail | ||
|
||
task_log.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can assign expense_group = None inside 55 line block and then in __handle_netsuite_connection_error(), check for expense_group existence and update or create things
|
No description provided.