# Serializer Error When Listing All Time Users Directory

**URL:** https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897
**Category:** Bug
**Created:** [September 30, 2016, 7:06am UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897 "2016-09-30T07:06:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kstaikov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kstaikov/32/72615_2.png) [@kstaikov](https://meta.discourse.org/u/kstaikov)
#### Post date: [September 30, 2016, 7:06am UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897/1 "2016-09-30T07:06:44Z")

</div>

/directory\_items?period=all&order=likes\_received returns a 500.

On the UI, the spinner just spins forever if I have selected all time, otherwise the other options (weekly, monthly, etc.) load OK. However, they show a user that is blank that is probably a test user I deleted after making a post:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/4/24965d2a1192d7d06c13ad4070db13842e0650ce.png)

The logs show a serializer error:

```
NoMethodError (undefined method `time_read' for nil:NilClass) /var/www/discourse/app/serializers/directory_item_serializer.rb:14:in `time_read'

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 30, 2016, 3:31pm UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897/2 "2016-09-30T15:31:34Z")

</div>

Can’t repro.

![](https://global.discourse-cdn.com/meta/optimized/3X/4/9/499887d86981fa7a5bad37bd09f48940295cd4b4_2_690x36.png)

Did how exactly you deleted the user?

---

<div class="post-metadata">

### Author: ![kstaikov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kstaikov/32/72615_2.png) [@kstaikov](https://meta.discourse.org/u/kstaikov)
#### Post date: [September 30, 2016, 3:51pm UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897/3 "2016-09-30T15:51:05Z")

</div>

delete all posts, delete user. I had created a handful of users and posted and deleted them all fine, strictly through UI, etc. Only thing that stands out is that one topic was created while I was impersonating another user.

---

<div class="post-metadata">

### Author: ![kstaikov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kstaikov/32/72615_2.png) [@kstaikov](https://meta.discourse.org/u/kstaikov)
#### Post date: [September 30, 2016, 4:00pm UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897/4 "2016-09-30T16:00:39Z")

</div>

Is there anything I can do to manually clean it up?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 30, 2016, 4:03pm UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897/5 "2016-09-30T16:03:24Z")

</div>

I think this is somehow related to the batch that updates this page didn’t ran after the delete. Gotta repro yet, tough.

---

<div class="post-metadata">

### Author: ![kstaikov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kstaikov/32/72615_2.png) [@kstaikov](https://meta.discourse.org/u/kstaikov)
#### Post date: [September 30, 2016, 8:37pm UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897/6 "2016-09-30T20:37:27Z")

</div>

I haven’t touched anything but I guess some job ran eventually and now it is okay and works fine, hmm

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 30, 2016, 9:29pm UTC](https://meta.discourse.org/t/serializer-error-when-listing-all-time-users-directory/50897/7 "2016-09-30T21:29:35Z")

</div>


