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
@ -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…
x
Reference in New Issue
Block a user