Skip to content

Commit

Permalink
Fix changes in other settings tabs resetting max char count (mastodon…
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrss committed Jul 7, 2023
1 parent a1fa7b0 commit 8981444
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/form/admin_settings.rb
Expand Up @@ -84,7 +84,8 @@ class Form::AdminSettings

define_model_callbacks :save
before_save do
@status_max_chars = StatusLengthValidator::DEFAULT_MAX_CHARS if @status_max_chars.blank?
remove_instance_variable(:@status_max_chars) if @status_max_chars.blank?
@status_max_chars = StatusLengthValidator::DEFAULT_MAX_CHARS if @status_max_chars == '0'
end

KEYS.each do |key|
Expand Down

0 comments on commit 8981444

Please sign in to comment.