summaryrefslogtreecommitdiff
path: root/app/serializers/environment_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/environment_entity.rb')
-rw-r--r--app/serializers/environment_entity.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/environment_entity.rb b/app/serializers/environment_entity.rb
index 66ca2382901..6105b52fbda 100644
--- a/app/serializers/environment_entity.rb
+++ b/app/serializers/environment_entity.rb
@@ -21,7 +21,7 @@ class EnvironmentEntity < Grape::Entity
expose :stop_action_available?, as: :has_stop_action
expose :rollout_status, if: -> (*) { can_read_deploy_board? }, using: RolloutStatusEntity
- expose :upcoming_deployment, expose_nil: false do |environment, ops|
+ expose :upcoming_deployment, if: -> (environment) { environment.upcoming_deployment } do |environment, ops|
DeploymentEntity.represent(environment.upcoming_deployment,
ops.merge(except: UNNECESSARY_ENTRIES_FOR_UPCOMING_DEPLOYMENT))
end
@@ -122,4 +122,4 @@ class EnvironmentEntity < Grape::Entity
end
end
-EnvironmentEntity.prepend_if_ee('::EE::EnvironmentEntity')
+EnvironmentEntity.prepend_mod_with('EnvironmentEntity')