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 Feb 24, 2024
1 parent 87a8899 commit f73a590
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 f73a590

Please sign in to comment.