Skip to content

Commit a76ae51

Browse files
committed
fix docstring
1 parent bf4bd0e commit a76ae51

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/sentry/seer/endpoints/seer_rpc.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ def get_project_preferences(*, organization_id: int, project_id: int) -> dict |
880880
"""Get Seer project preferences for a single project.
881881
882882
Raises Project.DoesNotExist if the project is not found or doesn't belong to the org.
883-
Returns None if the project has no configured preferences.
883+
Returns None if the project has no preference row in Seer DB.
884884
"""
885885
project = Project.objects.get_from_cache(id=project_id)
886886
if project.organization_id != organization_id:
@@ -891,9 +891,7 @@ def get_project_preferences(*, organization_id: int, project_id: int) -> dict |
891891
return read_preference_from_sentry_db(project).dict()
892892

893893
preference = get_project_seer_preferences(project_id).preference
894-
if preference is None:
895-
return None
896-
return preference.dict()
894+
return preference.dict() if preference else None
897895

898896

899897
def bulk_get_project_preferences(*, organization_id: int, project_ids: list[int]) -> dict:

0 commit comments

Comments
 (0)