light modification
This commit is contained in:
@@ -33,6 +33,10 @@ type AbstractResource struct {
|
||||
SelectedInstanceIndex *int `json:"selected_instance_index,omitempty" bson:"selected_instance_index,omitempty"` // SelectedInstance is the selected instance
|
||||
}
|
||||
|
||||
func (r *AbstractResource) GetType() string {
|
||||
return r.Type
|
||||
}
|
||||
|
||||
func (r *AbstractResource) StoreDraftDefault() {
|
||||
r.IsDraft = true
|
||||
}
|
||||
@@ -81,6 +85,7 @@ func (abs *AbstractIntanciatedResource[T]) SetAllowedInstances(request *tools.AP
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user