-
Notifications
You must be signed in to change notification settings - Fork 0
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
Import Logs for Deps Import #186
Closed
Closed
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
f6df1ec
Delete purchase_invoice, line_items on failed exports from hh2, type-…
Hrishabh17 372c628
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 d0ad337
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 7825b9e
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 b79c74c
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 97779c6
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 601e3cb
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 fb78432
Refactor deps schedule to run post Job import
Hrishabh17 57a4ed4
Fyle Card <> Vendor Mapping setup
Hrishabh17 19dfa7d
Added script to add mapping_settings
Hrishabh17 151e397
Fix post release script
Hrishabh17 ffbe1f5
Projects and Deps fields disable v1
Hrishabh17 372e5ab
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 737c79d
Remove dep setting trigger, add logger
Hrishabh17 da072df
Merge branch 'refactor-deps-import' into vendor-card-mapping
Hrishabh17 e2f4cef
Modified script, added additional test case
Hrishabh17 5bc9075
lint fix
Hrishabh17 c6a4697
Remove mock object
Hrishabh17 f667558
Merge branch 'refactor-deps-import' into vendor-card-mapping
Hrishabh17 1c2e3c1
Add details while logging
Hrishabh17 0e98a8a
Merge branch 'refactor-deps-import' into vendor-card-mapping
Hrishabh17 d23f0cd
modify post-release script
Hrishabh17 7dd6145
Merge branch 'vendor-card-mapping' into disable-sage-fields
Hrishabh17 f1a31f1
bump accounting-mapping version
Hrishabh17 505fabc
modify the variable_name, add conditional update
Hrishabh17 e85f6b2
Add example objects
Hrishabh17 b1f39ca
Added loggers
Hrishabh17 555a72c
Added test cases
Hrishabh17 675c37a
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 84ba2e9
Dependent Field optimizations
Hrishabh17 6dd28a9
fix failing test
Hrishabh17 aa96f62
Added Import Log for Deps
Hrishabh17 51e76e5
Fix post-release script
Hrishabh17 6cbcb7d
Merge branch 'dep-field-optimization' into dep-import-log
Hrishabh17 6c54fdc
fix failing test cases
Hrishabh17 1da8a7d
Set cost category import to fail on cost code fail
Hrishabh17 9aefa9f
Modify handle_import_exception for both class and func
Hrishabh17 173d31a
Modify test cases
Hrishabh17 5dac65e
fix ordering of saving import_log
Hrishabh17 ef99211
Move the import_log creation to ImportLog method
Hrishabh17 771c939
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 0d688ac
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 53d90b1
Merge branch 'master' of github.com:fylein/fyle-sage-desktop-api
Hrishabh17 766beb3
Merged master and bumped accounting-mappings version
Hrishabh17 8393600
Add logger in import
Hrishabh17 7a6d4fa
Merge branch 'master' into dep-import-log
Hrishabh17 30b7c50
Merge branch 'master' into dep-import-log
Hrishabh17 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,17 +158,14 @@ def post_dependent_expense_field_values(workspace_id: int, dependent_field_setti | |
posted_cost_types = post_dependent_cost_code(cost_code_import_log, dependent_field_setting, platform, filters) | ||
if posted_cost_types: | ||
filters['cost_code_name__in'] = posted_cost_types | ||
post_dependent_cost_type(cost_category_import_log, dependent_field_setting, platform, filters) | ||
|
||
if cost_code_import_log.status in ['FAILED', 'FATAL']: | ||
cost_category_import_log.status = 'FAILED' | ||
cost_category_import_log.error_log = {'message': 'Importing COST_CODE failed'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
cost_category_import_log.save() | ||
return | ||
else: | ||
cost_category_import_log.status = 'COMPLETE' | ||
cost_category_import_log.error_log = [] | ||
cost_category_import_log.save() | ||
post_dependent_cost_type(cost_category_import_log, dependent_field_setting, platform, filters) | ||
|
||
DependentFieldSetting.objects.filter(workspace_id=workspace_id).update(last_successful_import_at=datetime.now()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should bring this inside else block, else we might mark timestamp even for failed runs |
||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
wouldn't there be exception incase of errors?
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.
Both post_cost_code and post_cost_type method are decoarated with handle_import_exception
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 fixed the call ordering, it was wrong earlier. can check code again for this.