This commit is contained in:
ahmadbilalkhalid 2019-08-31 17:28:43 +05:00
parent 59d34fd7f8
commit 8ca850a6fe

View file

@ -117,7 +117,7 @@ class CreateImageSchema(BaseSchema):
image_stores = list(client.get_prefix("/v1/image_store/"))
image_store = next(filter(lambda s: json.loads(s.value)["name"] == self.image_store.value,
image_stores))
image_stores), None)
if not image_store:
self.add_error(f"Store '{self.image_store.value}' does not exists")