# Bug OP-17507 - NoMethodError in TimeEntriesController#update

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-17507

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module | Modules and project features / Time tracking |
| Target versions | 17.7.0 |
| Observed in versions | 16.2.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 16.2.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Klaus Zanders |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

Unknown (AppSignal)

### What is the buggy behavior?

Trying to call time\_zone on a user that&#x27;s nil.

### What is the expected behavior?

No error, not calling inappropriate things on nil.

###   

### **Logs**

*   AppSignal: [https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/946](https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/946)
    

```text
undefined method 'time_zone' for nil

Backtrace
modules/costs/app/components/time_entries/user_form.rb:92 TimeEntries::UserForm#caption
modules/costs/app/components/time_entries/user_form.rb:48 block in <class:UserForm>
modules/costs/app/components/time_entries/time_entry_form_component.html.erb:34 block (4 levels) in TimeEntries::TimeEntryFormComponent#call
app/components/op_primer/component_helpers.rb:32 OpPrimer::ComponentHelpers#flex_layout
modules/costs/app/components/time_entries/time_entry_form_component.html.erb:32 block (2 levels) in TimeEntries::TimeEntryFormComponent#call
modules/costs/app/components/time_entries/time_entry_form_component.html.erb:31 block in TimeEntries::TimeEntryFormComponent#call
app/components/concerns/op_turbo/streamable.rb:105 TimeEntries::TimeEntryFormComponent#component_wrapper
modules/costs/app/components/time_entries/time_entry_form_component.html.erb:30 TimeEntries::TimeEntryFormComponent#call
app/components/concerns/op_turbo/streamable.rb:52 TimeEntries::TimeEntryFormComponent#render_as_turbo_stream
app/controllers/concerns/op_turbo/component_stream.rb:65 OpTurbo::ComponentStream#modify_via_turbo_stream
app/controllers/concerns/op_turbo/component_stream.rb:52 OpTurbo::ComponentStream#update_via_turbo_stream
modules/costs/app/controllers/time_entries_controller.rb:114 TimeEntriesController#update
```
