From b5d33a656f7045caa946d4bb25990a8c704dbb29 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 11 Jan 2016 17:13:52 +0000 Subject: Postgres doesn't like booleans --- synapse/storage/registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/storage') diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py index ece71f2ee8..999b710fbb 100644 --- a/synapse/storage/registration.py +++ b/synapse/storage/registration.py @@ -106,12 +106,12 @@ class RegistrationStore(SQLBaseStore): " upgrade_ts = ?," " is_guest = ?" " WHERE name = ?", - [password_hash, now, make_guest, user_id]) + [password_hash, now, 1 if make_guest else 0, user_id]) else: txn.execute("INSERT INTO users " "(name, password_hash, creation_ts, is_guest) " "VALUES (?,?,?,?)", - [user_id, password_hash, now, make_guest]) + [user_id, password_hash, now, 1 if make_guest else 0]) except self.database_engine.module.IntegrityError: raise StoreError( 400, "User ID already taken.", errcode=Codes.USER_IN_USE -- cgit 1.4.1