Syntax error in query
Looks like you're passing a tuple in to user id
 Hi!

Its resolved, switched to get_or_create and then it told me it was a tuple and not an int as you stated.

It was just a misleading error ;)
 Thank you for your quick reply
 Sure thing, I think peewee could stand to get smarter about checking these types of errors, but then there will be an inevitable performance hit. So, trade-off.

Python2.7

```
peewee[20118] DEBUG ('SELECT "t1"."id", "t1"."user_id", "t1"."unique", "t1"."title", "t1"."message", "t1"."created_date" FROM "event" AS t1 WHERE (((("t1"."message" = ?) AND ("t1"."unique" = ?)) AND ("t1"."user_id" = (?, ?))) AND ("t1"."title" = ?)) LIMIT 1 OFFSET 0', [u'Someone created a new project', u'97df91d41dc15590451eade6f1d16de1bb218d1e0d8a21aa2de295f1', 25, 0, u'Ruby'])
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/Users/magnusknutas/git/thefarm/app/services/mqtt_service.py", line 38, in run
    self.client.loop()
  File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 811, in loop
    rc = self.loop_read(max_packets)
  File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 1073, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 1475, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 1947, in _packet_handle
    return self._handle_pubrel()
  File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 2152, in _handle_pubrel
    self._handle_on_message(self._in_messages[i])
  File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 2274, in _handle_on_message
    self.on_message(self, self._userdata, message)
  File "/Users/magnusknutas/git/thefarm/app/services/mqtt_service.py", line 84, in on_message
    message=text
  File "/usr/local/lib/python2.7/site-packages/peewee.py", line 4800, in get_or_create
    return query.get(), False
  File "/usr/local/lib/python2.7/site-packages/peewee.py", line 3090, in get
    return next(clone.execute())
  File "/usr/local/lib/python2.7/site-packages/peewee.py", line 3142, in execute
    self._qr = ResultWrapper(model_class, self._execute(), query_meta)
  File "/usr/local/lib/python2.7/site-packages/peewee.py", line 2826, in _execute
    return self.database.execute_sql(sql, params, self.require_commit)
  File "/usr/local/lib/python2.7/site-packages/peewee.py", line 3683, in execute_sql
    self.commit()
  File "/usr/local/lib/python2.7/site-packages/peewee.py", line 3507, in __exit__
    reraise(new_type, new_type(*exc_args), traceback)
  File "/usr/local/lib/python2.7/site-packages/peewee.py", line 3676, in execute_sql
    cursor.execute(sql, params or ())
OperationalError: near ",": syntax error
```
