fixed bug, sodass auch ein user sich einloggen kann, wenn er noch nicht in der datenbank ist

This commit is contained in:
Tim Gröger 2020-06-08 16:41:48 +02:00
parent c7e1c981e6
commit ba16743fde
2 changed files with 6 additions and 4 deletions

View File

@ -9,6 +9,7 @@ from geruecht.model.user import User
class Base:
def getCreditListFromUser(self, user, **kwargs):
try:
if type(user) is User:
if user.uid == 'extern':
return []
cursor = self.db.connection.cursor()

View File

@ -38,6 +38,7 @@ class Base:
retVal.initGeruechte(creditLists)
if workgroups:
retVal.workgroups = self.getWorkgroupsOfUser(retVal.id)
if retVal:
if retVal.uid == username:
return retVal
else: