Previously we were using auth0. There email id was not unique.
We were elying on auth0 user id. But now we are using github
for authentication. We changed the DB model to
email = db.Column(db.TEXT, unique=True, index=True)
So email supposed to be unique.
That is why changing SQL-alchemy's first method call to one.
Also add Exception handling, as if there is no data SQL-alchemy
throws, NoResultFound exception.
Previously we were using auth0. There email id was not unique. We were elying on auth0 user id. But now we are using github for authentication. We changed the DB model to email = db.Column(db.TEXT, unique=True, index=True) So email supposed to be unique.
That is why changing SQL-alchemy's first method call to one. Also add Exception handling, as if there is no data SQL-alchemy throws, NoResultFound exception.
Resolves : #310