mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 10313: on trying to delete a default offering throw error
This commit is contained in:
parent
db29a56eaf
commit
94a278a638
@ -1728,6 +1728,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
||||
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);
|
||||
return true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user