diff --git a/app/controllers/pet_states_controller.rb b/app/controllers/pet_states_controller.rb index cd988d9c9..4fc7d5339 100644 --- a/app/controllers/pet_states_controller.rb +++ b/app/controllers/pet_states_controller.rb @@ -38,7 +38,7 @@ class PetStatesController < ApplicationController # Rather than just getting the newest unlabeled pet state, prioritize the # newest *pet type*. This better matches the user's perception of what the # newest state is, because the Rainbow Pool UI is grouped by pet type! - unlabeled_appearance = PetState.unlabeled.newest_pet_type.newest.first + unlabeled_appearance = PetState.needs_labeling.newest_pet_type.newest.first if unlabeled_appearance edit_pet_type_pet_state_path( diff --git a/app/models/pet_state.rb b/app/models/pet_state.rb index 2a5ce1dfd..17b027ed8 100644 --- a/app/models/pet_state.rb +++ b/app/models/pet_state.rb @@ -20,6 +20,7 @@ class PetState < ApplicationRecord scope :newest, -> { order(created_at: :desc) } scope :newest_pet_type, -> { joins(:pet_type).merge(PetType.newest) } scope :unlabeled, -> { with_pose("UNKNOWN") } + scope :needs_labeling, -> { unlabeled.where(glitched: false) } # A simple ordering that tries to bring reliable pet states to the front. scope :emotion_order, -> {