Properly check if API instances need overwriting

This commit is contained in:
Thomas Wade 2020-04-25 03:38:47 +09:30
parent 7fe51c340a
commit 7e3584d5ee
2 changed files with 3 additions and 3 deletions

View File

@ -597,7 +597,7 @@ class FAAPI:
# Get the cached user, updating the API instance if necessary # Get the cached user, updating the API instance if necessary
user = self._usercache[username] user = self._usercache[username]
if not user._api: if user._api is not self:
user._api = self user._api = self
return user return user
@ -622,7 +622,7 @@ class FAAPI:
# Get the cached submission, updating the API instance if necessary # Get the cached submission, updating the API instance if necessary
submission = self._submissioncache[id] submission = self._submissioncache[id]
if not submission._api: if submission._api is not self:
submission._api = self submission._api = self
return submission return submission

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='FAAPI', name='FAAPI',
version='0.6.2', version='0.6.3',
packages=find_packages(), packages=find_packages(),
url='https://tem.party/gitea/tom/FAAPI', url='https://tem.party/gitea/tom/FAAPI',
license='WTFPL', license='WTFPL',