On Puppetclass create, there are no persisted EnvironmentClasses yet, so location_ids and organization_ids were always empty on create.
This allows to save EnvironmentClasses with Puppetclasses together and thus get the location_ids and organization_ids from the unsaved EnvironmentClasses. Thus the audit for Puppetclass will get correctly taxed.
Related issues
Bug #32121: Puppetclass creation audits are not correctly taxed
Fixes #32121 - Puppetclass create audit taxonomy
On Puppetclass create, there are no persisted EnvironmentClasses yet,
so location_ids and organization_ids were always empty on create.
This allows to save EnvironmentClasses with Puppetclasses together and
thus get the location_ids and organization_ids from the unsaved
EnvironmentClasses. Thus the audit for Puppetclass will get correctly
taxed.