diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-10-19 15:49:09 +0300 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-10-20 15:17:22 +0300 |
commit | c1212beaa495b5b0c3b805bb1b2a7bdc6d1a941b (patch) | |
tree | 5a99eca6e6047a13ab71159a6c16ae50ba78b382 /app/models/environment.rb | |
parent | ba2d5b16028e0b8430f7297372a9b82fbd006fd7 (diff) |
Use deployment IID when saving refs
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index d575f1dc73a..73f415c0ef0 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -71,8 +71,8 @@ class Environment < ActiveRecord::Base return nil unless ref - deployment_id = ref.split('/').last - deployments.find(deployment_id) + deployment_iid = ref.split('/').last + deployments.find_by(iid: deployment_iid) end def ref_path |