Skip to content

Commit

Permalink
fix - deal with case when check view exists returns None (#5740)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff authored and krrishdholakia committed Sep 18, 2024
1 parent fdfb632 commit a4f9f00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions litellm/proxy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,11 @@ async def check_view_exists(self):
"""
)
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
Expand Down

0 comments on commit a4f9f00

Please sign in to comment.