# "Autobiographer" badge query and empty bio\_raw

**URL:** https://meta.discourse.org/t/autobiographer-badge-query-and-empty-bio-raw/57242
**Category:** Feature
**Created:** [11 Fevereiro , 2017 12:10 UTC](https://meta.discourse.org/t/autobiographer-badge-query-and-empty-bio-raw/57242 "2017-02-11T12:10:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![youwiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/youwiki/32/89936_2.png) [@youwiki](https://meta.discourse.org/u/youwiki)
#### Post date: [11 Fevereiro , 2017 12:10 UTC](https://meta.discourse.org/t/autobiographer-badge-query-and-empty-bio-raw/57242/1 "2017-02-11T12:10:10Z")

</div>

Hello!

I just been found that after saving user profile with an empty “About” field, it will be empty in the database, but not null. At the same time in a badge query “Autobiographer” are checked for null value for `bio_raw` field.  
It seems to solve this problem, should to change this badge query to check the empty and null value for `bio_raw` or change the `cook` function in the `app/models/user_profile.rb` model by adding `self.bio_raw = nil` when `self.bio_raw` not present.

P.S. Same for location.  
P.P.S. See that it have lenght check for bio\_raw, so all right for this badge query!🙂

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [13 Fevereiro , 2017 11:03 UTC](https://meta.discourse.org/t/autobiographer-badge-query-and-empty-bio-raw/57242/2 "2017-02-13T11:03:46Z")

</div>

I will gladly merge a PR fixing the SQL queries 😉
