Added a nil check for @record when setting ownership on a service

https://bugzilla.redhat.com/show_bug.cgi?id=1110971
@AparnaKarve I think this could be:
```ruby
locals[:record_id] = @record.try(:id)
```