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

View File

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