From 7e3584d5ee82083ebee6bd3ee05b301dec7df4b3 Mon Sep 17 00:00:00 2001 From: Thomas Wade Date: Sat, 25 Apr 2020 03:38:47 +0930 Subject: [PATCH] Properly check if API instances need overwriting --- FAAPI/FAAPI.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FAAPI/FAAPI.py b/FAAPI/FAAPI.py index d35d6c8..a9dc377 100644 --- a/FAAPI/FAAPI.py +++ b/FAAPI/FAAPI.py @@ -597,7 +597,7 @@ class FAAPI: # Get the cached user, updating the API instance if necessary user = self._usercache[username] - if not user._api: + if user._api is not self: user._api = self return user @@ -622,7 +622,7 @@ class FAAPI: # Get the cached submission, updating the API instance if necessary submission = self._submissioncache[id] - if not submission._api: + if submission._api is not self: submission._api = self return submission diff --git a/setup.py b/setup.py index 5d6bf29..b0a470d 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='FAAPI', - version='0.6.2', + version='0.6.3', packages=find_packages(), url='https://tem.party/gitea/tom/FAAPI', license='WTFPL',