diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-12-19 13:52:54 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-12-19 13:52:54 +0100 |
commit | ab5ff638f2968e3f434e504c7caab370bf71c9c0 (patch) | |
tree | 172f2c2fc8192688b960dd2bd42ea126ad9245fb /app/models | |
parent | 66ab1f83b0d342341181e0c88da83c966391fc0c (diff) | |
parent | 902c6bed5aab12c2e97af3452f122247777226af (diff) |
Merge branch 'master' into glitch-soc/master
Conflicts: - `config/locales/en.yml` No real conflict, upstream added a translatable string “too close” to one specific to glitch-soc - `lib/mastodon/statuses_cli.rb` Fixes made upstream, while changed in glitch-soc to keep bookmarked statuses - `package.json` No real conflict, additional dependency in glitch-soc
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/backup.rb | 2 | ||||
-rw-r--r-- | app/models/form/admin_settings.rb | 2 | ||||
-rw-r--r-- | app/models/form/custom_emoji_batch.rb | 2 | ||||
-rw-r--r-- | app/models/tag.rb | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/app/models/backup.rb b/app/models/backup.rb index c2651313b..8eeb1748a 100644 --- a/app/models/backup.rb +++ b/app/models/backup.rb @@ -7,7 +7,7 @@ # user_id :bigint(8) # dump_file_name :string # dump_content_type :string -# dump_file_size :integer +# dump_file_size :bigint # dump_updated_at :datetime # processed :boolean default(FALSE), not null # created_at :datetime not null diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb index 3398af169..84a656864 100644 --- a/app/models/form/admin_settings.rb +++ b/app/models/form/admin_settings.rb @@ -16,6 +16,7 @@ class Form::AdminSettings open_deletion timeline_preview show_staff_badge + enable_bootstrap_timeline_accounts bootstrap_timeline_accounts flavour skin @@ -46,6 +47,7 @@ class Form::AdminSettings open_deletion timeline_preview show_staff_badge + enable_bootstrap_timeline_accounts activity_api_enabled peers_api_enabled show_known_fediverse_at_about_page diff --git a/app/models/form/custom_emoji_batch.rb b/app/models/form/custom_emoji_batch.rb index 076e8c9e3..6b7ea5355 100644 --- a/app/models/form/custom_emoji_batch.rb +++ b/app/models/form/custom_emoji_batch.rb @@ -40,7 +40,7 @@ class Form::CustomEmojiBatch if category_id.present? CustomEmojiCategory.find(category_id) elsif category_name.present? - CustomEmojiCategory.create!(name: category_name) + CustomEmojiCategory.find_or_create_by!(name: category_name) end end diff --git a/app/models/tag.rb b/app/models/tag.rb index d3a7e1e6d..bce76fc16 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -117,7 +117,7 @@ class Tag < ApplicationRecord class << self def find_or_create_by_names(name_or_names) Array(name_or_names).map(&method(:normalize)).uniq { |str| str.mb_chars.downcase.to_s }.map do |normalized_name| - tag = matching_name(normalized_name).first || create!(name: normalized_name) + tag = matching_name(normalized_name).first || create(name: normalized_name) yield tag if block_given? |