fix - deal with case when check view exists returns None (#5740)

This commit is contained in:
Ishaan Jaff 2024-09-17 08:38:19 -07:00 committed by GitHub
parent 815d46f9e1
commit 535228159b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -991,6 +991,11 @@ class PrismaClient:
"""
)
expected_total_views = len(expected_views)
# Deal with case when ret is None
if ret is None:
ret = [{"view_count": 0, "view_names": []}]
if ret[0]["view_count"] == expected_total_views:
verbose_proxy_logger.info("All necessary views exist!")
return