Skip to content

Commit

Permalink
Fix invalid nil comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
chrztoph committed Dec 30, 2024
1 parent ddbb8c4 commit 25d63df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 25d63df

Please sign in to comment.