summaryrefslogtreecommitdiffstats
path: root/app/models.py
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-10-03 00:14:59 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2014-10-03 00:14:59 +0200
commitbc3550b0ff9959cd44702e6e98a5df43a3f52254 (patch)
treeee5f1ecc9164d8ef14d1352b1378f2cf230df03d /app/models.py
parentfb217ca2658c25f4df0a9b9b471ad85c608377a9 (diff)
downloadtbt-bc3550b0ff9959cd44702e6e98a5df43a3f52254.tar.xz
another big dump. github oauth authentiation is "working"
But it's done really hackily and probably should never be done like this.
Diffstat (limited to 'app/models.py')
-rw-r--r--app/models.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models.py b/app/models.py
index 4df6689..dc6a7cd 100644
--- a/app/models.py
+++ b/app/models.py
@@ -5,8 +5,7 @@ class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
nickname = db.Column(db.String(64), index=True, unique=True)
email = db.Column(db.String(120), index=True, unique=True)
- opened = db.relationship('Ticket', backref='opened_by', lazy='dynamic', primaryjoin = 'Ticket.opened_by_user_id == User.id')
- assigned = db.relationship('Ticket', backref='assigned_to', lazy='dynamic', primaryjoin = 'Ticket.assigned_to_user_id == User.id')
+ opened = db.relationship('Ticket', backref='opened_by', lazy='dynamic')
def __repr__(self):
@@ -22,12 +21,9 @@ class Ticket(db.Model):
updated_at = db.Column(db.DateTime)
status = db.Column(db.String(64), nullable=False, default='open')
- resolution = db.Column(db.String(64))
reason = db.Column(db.String(140))
- deleted = db.Column(db.Boolean, default=False)
opened_by_user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
- assigned_to_user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
def __repr__(self):
return '<Ticket %r>' % (self.id)