archives: raise exception if not configured.

This commit is contained in:
evazion
2017-04-05 00:52:59 -05:00
parent 3f35a9ab64
commit 086b520dcc
5 changed files with 13 additions and 14 deletions

View File

@@ -29,17 +29,7 @@ private
def check_availabililty
if !PoolArchive.enabled?
respond_to do |format|
format.html do
flash[:notice] = "Archive service is not configured. Pool versions are not saved."
redirect_to :back
end
format.json do
render json: {success: false, reason: "Archive service is not configured"}.to_json, status: 501
end
end
return false
raise NotImplementedError.new("Archive service is not configured. Pool versions are not saved.")
end
end
end