summaryrefslogtreecommitdiff
path: root/db/user.py
diff options
context:
space:
mode:
Diffstat (limited to 'db/user.py')
-rw-r--r--db/user.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/db/user.py b/db/user.py
index a129a13..7b61fab 100644
--- a/db/user.py
+++ b/db/user.py
@@ -1,5 +1,3 @@
-from time import time
-
from sqlalchemy.sql import text
class DBUser:
@@ -15,12 +13,10 @@ class DBUser:
def new(self, nick):
sql = "INSERT \
- INTO users (nick, created) \
- VALUES (:nick, :created) \
+ INTO users (nick) \
+ VALUES (:nick) \
RETURNING id ;"
- result = self.db.session.execute(
- text(sql), { "nick":nick, "created":int(time()) }
- )
+ result = self.db.session.execute( text(sql), { "nick":nick } )
self.db.session.commit()
return result.fetchone()[0]