Skip to content

Commit

Permalink
fix(api texts): error code for no translation.
Browse files Browse the repository at this point in the history
  • Loading branch information
YishaiGlasner committed Sep 3, 2023
1 parent b9fce28 commit fbd334a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/api_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class APIWarningCode(Enum):
APINoVersion = 101
APINoLanguageVersion = 102
APINoSourceText = 103
APINoTranslationText = 104

"""
classes for data warnings in API calls.
Expand Down Expand Up @@ -57,5 +58,5 @@ def __init__(self, oref: Ref):
class APINoTranslationText(TextsAPIResponseMessage):

def __init__(self, oref: Ref):
self.warning_code = APIWarningCode.APINoSourceText.value
self.warning_code = APIWarningCode.APINoTranslationText.value
self.message = f'We do not have a translation for {oref}'

0 comments on commit fbd334a

Please sign in to comment.