-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: event import #5514
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
fix: event import #5514
Conversation
Codecov Report
@@ Coverage Diff @@
## development #5514 +/- ##
===============================================
+ Coverage 65.57% 66.69% +1.12%
===============================================
Files 277 286 +9
Lines 13439 13876 +437
===============================================
+ Hits 8812 9255 +443
+ Misses 4627 4621 -6
Continue to review full report at Codecov.
|
96b1a7e to
2275779
Compare
abhinavk96
left a comment
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.
Resolve the codacy issues please
864ae11 to
e545481
Compare
|
@CosmicCoder96 do you think these codacy issues need to be fixed? i cannot change variable name 'id' and no methods are currently required in impor_job schema. |
iamareebjamal
left a comment
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.
URL issues
|
@YogeshSharma0201 update this please |
e545481 to
efbb267
Compare
efbb267 to
3269d29
Compare
|
@CosmicCoder96 please review |
app/api/helpers/import_helpers.py
Outdated
| path + '/social_links', | ||
| json.dumps(data.get('social_links', [])) | ||
| ) # save social_links | ||
| with open(path + '/social_links', 'w') as file: |
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?
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.
@CosmicCoder96 i can't use write_file() because it tries to encode the data in utf-8 which gives 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.
What 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.
@iamareebjamal error: decoding str is not supported
|
@YogeshSharma0201 updates? |
3269d29 to
9234793
Compare
cc7eb99 to
30f97aa
Compare
30f97aa to
a68ce32
Compare
|
@CosmicCoder96 please review |
|
@iamareebjamal Can you help out with the error mentioned by @YogeshSharma0201. What could be a possible solution? |
|
Add .encode('utf-8') after json.dumps call |
|
@YogeshSharma0201 Please update this now with the fix mentioned by @iamareebjamal |
app/api/helpers/import_helpers.py
Outdated
| json.dumps(data.get('social_links', [])) | ||
| ) # save social_links | ||
| json.dumps(data.get('social_links', [])).encode('utf-8') | ||
| ) # save social_links |
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.
at least two spaces before inline comment
Fixes #4613, #5513
Checklist
developmentbranch.Short description of what this resolves:
Import Event api is working now and through /import-jobs api Import jobs list can be retrieved and displayed on frontend.
Changes proposed in this pull request: