diff --git a/User.py b/User.py index 2dadf4a..b9bfffe 100644 --- a/User.py +++ b/User.py @@ -57,10 +57,10 @@ class User: @staticmethod def new_or_cached(api, username: str): # -> User: - if username in User._usercache: - return User._usercache[username] + if username not in User._usercache: + User._usercache[username] = User(api, username) - return User(api, username) + return User._usercache[username] def _get_gallery(self) -> List[Submission.Submission]: submissions = []