diff --git a/models/resources/resource.go b/models/resources/resource.go index bb9c7f3..2cf9f8c 100644 --- a/models/resources/resource.go +++ b/models/resources/resource.go @@ -81,11 +81,11 @@ func (abs *AbstractIntanciatedResource[T]) ConvertToPricedResource( } func (abs *AbstractIntanciatedResource[T]) SetAllowedInstances(request *tools.APIRequest) { + abs.AbstractResource.AbstractObject.Type = abs.GetType() abs.Instances = verifyAuthAction[T](abs.Instances, request) } func (d *AbstractIntanciatedResource[T]) Trim() { - d.AbstractResource.AbstractObject.Type = d.GetType() if ok, _ := (&peer.Peer{AbstractObject: utils.AbstractObject{UUID: d.CreatorID}}).IsMySelf(); !ok { for _, instance := range d.Instances { instance.ClearPeerGroups()