diff --git a/app/models/organization.rb b/app/models/organization.rb index 007b6538..115d2693 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -81,7 +81,9 @@ def machine_translation_character_limit deepl_client = Deepl::Client.new(self) usage = deepl_client.usage if usage - usage['character_limit'] + return usage['character_limit'] || 0 + else + return 0 end else # Otherwise use the limit set for the organization.