Skip to content
Snippets Groups Projects
Verified Commit 4c8f0f48 authored by Sachin Kamath's avatar Sachin Kamath
Browse files

Fix format on string and pep8 fixes

parent 2f14a6bd
Branches
No related tags found
No related merge requests found
......@@ -87,8 +87,8 @@ def add_new_user():
abort(500)
user = User(**newuser)
user.save()
return make_response(jsonify(status=201, msg="User {} successfully added" +
"to database".format(user.username)), 201)
return make_response(jsonify(status=201, msg="User {} successfully added".format(user.username) +
"to database"), 201)
#################################################
......@@ -145,6 +145,7 @@ def handle_sql_assertion_error(err):
errmsg = err.orig.args[0].split('\n')
except IndexError:
errmsg = err.orig.args[0]
return make_response(jsonify(status=400, msg=errmsg), 400)
......
# -*- coding: utf-8 -*-
from hodor import db
from sqlalchemy import inspect
class Challenges(db.Model):
__tablename__= 'challenges'
# Data variables for each challenge
chall_id=db.Column(db.String(32), primary_key=True,unique=True,nullable=False)
id = db.Column(db.String(32), primary_key=True, unique=True, nullable=False)
name = db.Column(db.String(32), nullable=False)
points = db.Column(db.Integer, nullable=False)
description = db.Column(db.String(2048), nullable=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment