ScopeLift / gitcoin-web

🤖Grow Open Source
https://gitcoin.co
Other
1 stars 0 forks source link

SMS Request Verification Multiple Times + 500 Error #65

Open apbendi opened 4 years ago

apbendi commented 4 years ago

Hey @zoek1, a couple of things related to SMS verification.

First, after going through the process once, I later got asked again, despite being logged in with the same user. It's only supposed to ask once, right?

Second, when I attempted to validated that second time around, I got a 500, with the following error in the logs:

web_1      |   File "/code/app/dashboard/views.py", line 5417, in send_verification
web_1      |     if cooldown > datetime.now():
web_1      | TypeError: can't compare offset-naive and offset-aware datetimes

Any thoughts? Maybe @owocki has some ideas too?

owocki commented 4 years ago

it should only make u confirm once

you can make a datetime timezone aware by .replace(tzinfo=pytz.utc) ing it

zoek1 commented 4 years ago

I push the fix for this today with the request from the last PR.

apbendi commented 4 years ago

Great, thanks @zoek1! Be sure to build off the latest bulk-grants branch, which has some additional functionality merged in.