Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
GUI-2682 check for missing image and report helpful error, not intern…
Browse files Browse the repository at this point in the history
…al error
  • Loading branch information
dkavanagh committed Feb 3, 2017
1 parent 64b796a commit e647bcb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eucaconsole/views/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,11 @@ def instance_launch(self):
"""Handles the POST from the Launch instanced wizard"""
if self.launch_form.validate():
tags_json = self.request.params.get('tags')
if self.image is None:
# image must no longer be available
msg = _(u'Selected image not available. It may have been recently removed or made private by another user.')
self.request.session.flash(msg, queue=Notification.ERROR)
return self.render_dict
image_id = self.image.id
num_instances = int(self.request.params.get('number', 1))
key_name = self.unescape_braces(self.request.params.get('keypair', ''))
Expand Down

0 comments on commit e647bcb

Please sign in to comment.