Skip to content

Commit

Permalink
Only archive service template if not active
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed May 25, 2018
1 parent 053adeb commit d494d8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/service_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ def destroy
super
end

def archive
raise _("Cannot archive while in use") unless active_requests.empty?
archive!
end

def request_class
ServiceTemplateProvisionRequest
end
Expand Down

0 comments on commit d494d8c

Please sign in to comment.