mirror of https://github.com/apache/cloudstack.git
bug 10313: on trying to delete a default offering throw error
This commit is contained in:
parent
cf15573d06
commit
30ba637a04
|
|
@ -1727,6 +1727,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
} else if (offering.getRemoved() != null) {
|
||||
throw new InvalidParameterValueException("unable to find service offering " + offeringId);
|
||||
}
|
||||
|
||||
if(offering.getDefaultUse()){
|
||||
throw new InvalidParameterValueException("Default service offerings cannot be deleted");
|
||||
}
|
||||
|
||||
if (_serviceOfferingDao.remove(offeringId)) {
|
||||
UserContext.current().setEventDetails("Service offering id=" + offeringId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue