```ruby
json.extract! work_log, :id, :date, :hours, :approved
json.site work_log.site.slug
```

Handle case where no site is attached to the work log
user
```ruby
json.extract! work_log, :id, :date, :hours, :approved
if work_log.site.nil?
  json.site ""
else
  json.site work_log.site.slug
end

```
assistant