Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def query_db_cache(self, word: str) -> Record:
try:
record = Record.get(word=word, source=self.provider)
except Record.DoesNotExist:
return None
else:
return record