| @@ -114,6 +114,9 @@ namespace :nico do | |||||
| if deerjikist | if deerjikist | ||||
| desired_non_nico_ids << deerjikist.tag_id | desired_non_nico_ids << deerjikist.tag_id | ||||
| desired_nico_ids << deerjikist.tag_id | desired_nico_ids << deerjikist.tag_id | ||||
| elsif !(Tag.where(id: desired_all_ids).where(category: :deerjikist).exists?) | |||||
| desired_non_nico_ids << Tag.no_deerjikist.id | |||||
| desired_nico_ids << Tag.no_deerjikist.id | |||||
| end | end | ||||
| desired_nico_ids.uniq! | desired_nico_ids.uniq! | ||||
| @@ -124,9 +127,6 @@ namespace :nico do | |||||
| if kept_non_nico_ids.to_set != desired_non_nico_ids.to_set | if kept_non_nico_ids.to_set != desired_non_nico_ids.to_set | ||||
| desired_all_ids << Tag.bot.id | desired_all_ids << Tag.bot.id | ||||
| end | end | ||||
| unless Tag.where(id: desired_all_ids).where(category: 'deerjikist').exists? | |||||
| desired_all_ids << Tag.no_deerjikist.id | |||||
| end | |||||
| desired_all_ids.uniq! | desired_all_ids.uniq! | ||||
| sync_post_tags!(post, desired_all_ids, current_ids: kept_ids) | sync_post_tags!(post, desired_all_ids, current_ids: kept_ids) | ||||