mentorship-backend icon indicating copy to clipboard operation
mentorship-backend copied to clipboard

Extend `password_hash` limit from User data model

Open isabelcosta opened this issue 4 years ago • 12 comments

Description

As a developer, I need to remove the limit for password_hash, so that I can fix the registration endpoint, that is erroring 500 INTERNAL SERVER ERROR, because of the limit being reached.

This relates to fixing #1109

A comment that may help: https://github.com/anitab-org/mentorship-backend/issues/1109#issuecomment-886053853

Mocks

print from swagger with the error

Acceptance Criteria

Update [Required]

  • [ ] Remove password_hash character limit

Definition of Done

  • [ ] All of the required items are completed.
  • [ ] Approval by 1 mentor.

Estimation

4h

isabelcosta avatar Jul 24 '21 13:07 isabelcosta

I would suggest setting a postgres SQL database, which is what we are using in the deployed server. I am using https://elephantsql.com/ for it (so the contributor can too). Make sure to have this working with a database with the current state of the models, and only after you create and run the migration to alter/modify the column to not have a limit or have a bigger limit.

If any doubts you can ping me or @anitab-org/mentorship-maintainers and on Zulip => https://anitab-org.zulipchat.com/ 🤗

isabelcosta avatar Jul 24 '21 13:07 isabelcosta

https://github.com/anitab-org/mentorship-backend/issues/1109#issuecomment-886228556

epicadk avatar Jul 25 '21 18:07 epicadk

Thank you for your points @epicadk on #1109 I just changed the title ;)

isabelcosta avatar Jul 29 '21 22:07 isabelcosta

@isabelcosta I am a first-timer. I am interested in solving this issue, can you please assign it to me. :)

mridubhatnagar avatar Aug 22 '21 06:08 mridubhatnagar

Assigning you @mridubhatnagar Happy coding! And welcome to the community:)

vj-codes avatar Aug 22 '21 09:08 vj-codes

@vj-codes @isabelcosta I have set up the project on my local system. Just wanted to understand how can I set up a database for the project?

mridubhatnagar avatar Aug 22 '21 16:08 mridubhatnagar

@vj-codes @isabelcosta I have set up the project on my local system. Just wanted to understand how can I set up a database for the project?

It should automatically create a sqllite database.

epicadk avatar Aug 23 '21 04:08 epicadk

@vj-codes @isabelcosta I have set up the project on my local system. Just wanted to understand how can I set up a database for the project?

It should automatically create a sqllite database.

On my local system when I run the server. I am getting an error

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:None 127.0.0.1 - - [23/Aug/2021 18:42:47] "GET /favicon.ico HTTP/1.1" 500 -

One of the possible reason the above errors comes is due to spelling mistake in the database name sqllite instead sqlite. I did cross check config.py to make sure spellings are correct. I could not find any mistake in file though. Not sure what could be other possible reason for the error.

mridubhatnagar avatar Aug 23 '21 13:08 mridubhatnagar

Are you using docker or venv?

epicadk avatar Aug 23 '21 17:08 epicadk

Are you using docker or venv?

venv

mridubhatnagar avatar Aug 23 '21 17:08 mridubhatnagar

@mridubhatnagar I have linked the possible fixes on zulip:)

vj-codes avatar Aug 23 '21 18:08 vj-codes

@vj-codes responded to you on zulip. :)

mridubhatnagar avatar Aug 25 '21 14:08 mridubhatnagar