diff options
author | Vincent Post <cent@spline.de> | 2020-08-07 18:17:46 +0200 |
---|---|---|
committer | Jonah BrĂ¼chert <jbb@kaidan.im> | 2023-05-22 00:28:12 +0200 |
commit | d9337687df1c808304e2cca3d5302bc58eb7ee51 (patch) | |
tree | 4328ee541cf95b7b33a3cf38f9deaca9a93c81d0 /accounts | |
parent | 955e66c149a8df3a1af78d8766eb46b78af76a82 (diff) | |
download | web-d9337687df1c808304e2cca3d5302bc58eb7ee51.tar.gz web-d9337687df1c808304e2cca3d5302bc58eb7ee51.tar.bz2 web-d9337687df1c808304e2cca3d5302bc58eb7ee51.zip |
Fixed recursion while deepcopy(Account)
Diffstat (limited to 'accounts')
-rw-r--r-- | accounts/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/accounts/models.py b/accounts/models.py index aa0e4d0..45648a4 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -51,7 +51,8 @@ class Account(UserMixin): self._set_attribute('mail', new_mail) def __getattr__(self, name): - if name in self.attributes: + # https://stackoverflow.com/a/47300262 + if name[:2] != "__" and name in self.attributes: return self.attributes[name] raise AttributeError("'%s' object has no attribute '%s'" % |