Fix errors trying to pickle users / log in

This commit is contained in:
RunasSudo 2018-08-31 10:37:06 +10:00
parent 4bc3fcf30c
commit 4b74072063
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,9 @@ class User(EmbeddedObject):
if admin.matched_by(self):
return True
return False
def __getstate__(self):
return {k: v for k, v in self.__dict__.items() if k != '_instance'}
def generate_password():
if is_python: