# Cleanup inactive user fails

**URL:** <https://meta.discourse.org/t/cleanup-inactive-user-fails/136595>\
**Category:** Product Support\
**Created:** [20 december 2019 om 09:42 UTC](https://meta.discourse.org/t/cleanup-inactive-user-fails/136595 "2019-12-20T09:42:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fhe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fhe/32/113345_2.png) [@fhe](https://meta.discourse.org/u/fhe)\
**Post date:** [19 november 2021 om 20:45 UTC](https://meta.discourse.org/t/cleanup-inactive-user-fails/136595/3 "2021-11-19T20:45:42Z")

</div>

I’m also getting this error:

```plaintext
Job exception: PG::DatatypeMismatch: ERROR: argument of AND must be type boolean, not type record
LINE 1: ...CT "user_histories".* FROM "user_histories" WHERE (acting_us...
                                                             ^

```

From what it looks like, there is no data for that specific `acting_user_id` in the `user_histories` table.

The error is also triggered by trying to manually delete the user.

---

_[View the full topic](https://meta.discourse.org/t/cleanup-inactive-user-fails/136595)._
