diff options
Diffstat (limited to 'app/models/concerns/repository_storage_movable.rb')
-rw-r--r-- | app/models/concerns/repository_storage_movable.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/concerns/repository_storage_movable.rb b/app/models/concerns/repository_storage_movable.rb index 77edabb9706..89bdef1ccc6 100644 --- a/app/models/concerns/repository_storage_movable.rb +++ b/app/models/concerns/repository_storage_movable.rb @@ -6,6 +6,9 @@ module RepositoryStorageMovable included do scope :order_created_at_desc, -> { order(created_at: :desc) } + scope :scheduled_or_started, -> do + where(state: [state_machine.states[:scheduled].value, state_machine.states[:started].value]) + end validates :container, presence: true validates :state, presence: true |