Skip to content
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

User class with working login #15

Merged
merged 16 commits into from
Apr 14, 2022
Merged

User class with working login #15

merged 16 commits into from
Apr 14, 2022

Conversation

XV1R
Copy link
Collaborator

@XV1R XV1R commented Apr 14, 2022

  • Added base routes for app along with mostly empty html
  • Refactored User to use PyMongo functionality to query image data
  • Users can now upload their own profile pictures

PyMongoFixed

For PyMongoFixed, we overwrite the send_file function in order to fix an existing bug.
Currently, flask_pymongo on Python 3.9+ is on version 2.3.0. This version uses PyMongo 4, which has since removed an attribute regarding the fileobj class, turning this into None. Because of this, when using the send_file() function, it is functionally impossible to query data, as it will always bring back a 500 response. Because of this, I made a wrapper class which overwrites and removes the problem attribute from trying to be set. With this, we're able to get the information and treat the rest of the class exactly the same.

@XV1R XV1R added priority Should be done in time backend Flask, DB, Routes, etc... labels Apr 14, 2022
@XV1R XV1R added this to the Tests + Classes milestone Apr 14, 2022
@XV1R XV1R requested a review from ymercad0 April 14, 2022 05:14
@XV1R XV1R self-assigned this Apr 14, 2022
@ymercad0 ymercad0 merged commit fdd9b1f into main Apr 14, 2022
@ymercad0 ymercad0 deleted the user_tests branch April 14, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Flask, DB, Routes, etc... priority Should be done in time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

send_file throwing an error in werkzeug by passing a None-type to function that requires str
2 participants