Skip to content

Commit

Permalink
Remove has_docker_image? from droplet_model.rb
Browse files Browse the repository at this point in the history
it just delegated to docker? anyway
  • Loading branch information
moleske committed Apr 14, 2023
1 parent 4122e6c commit 6c4b917
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion app/actions/droplet_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def update(droplet, message)

if message.requested?(:image)
raise InvalidDroplet.new('Droplet image can only be updated on staged droplets') unless droplet.staged?
raise InvalidDroplet.new('Images can only be updated for docker droplets') unless droplet.has_docker_image?
raise InvalidDroplet.new('Images can only be updated for docker droplets') unless droplet.docker?

droplet.docker_receipt_image = message.image
end
Expand Down
4 changes: 0 additions & 4 deletions app/models/runtime/droplet_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ def docker?
lifecycle_type == DockerLifecycleDataModel::LIFECYCLE_TYPE
end

def has_docker_image?
docker?
end

def docker_ports
exposed_ports = []
if self.execution_metadata.present?
Expand Down

0 comments on commit 6c4b917

Please sign in to comment.