aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/models.py
diff options
context:
space:
mode:
authortr4ck3ur <tr4ck3ur@style-python.fr>2015-02-14 12:01:04 +0100
committertr4ck3ur <tr4ck3ur@style-python.fr>2015-02-14 12:01:04 +0100
commit12d69abf83685d70030f06a203983f1298ae534a (patch)
tree686a7e005afb5fa4045c10b9861353eb410d3b55 /jm2l/models.py
parentbf7fdc00bfecee47a3d5025de077bb0640dd3146 (diff)
downloadjm2l-12d69abf83685d70030f06a203983f1298ae534a.tar.gz
jm2l-12d69abf83685d70030f06a203983f1298ae534a.tar.bz2
jm2l-12d69abf83685d70030f06a203983f1298ae534a.tar.xz
jm2l-12d69abf83685d70030f06a203983f1298ae534a.zip
Fix all last changes for pre-production test
Diffstat (limited to 'jm2l/models.py')
-rw-r--r--jm2l/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/jm2l/models.py b/jm2l/models.py
index 2938f3a..f104228 100644
--- a/jm2l/models.py
+++ b/jm2l/models.py
@@ -46,6 +46,10 @@ class TasksArea(Base):
name = Column(Unicode(80))
description = Column(UnicodeText)
+ @classmethod
+ def by_id(cls, id):
+ return DBSession.query(cls).filter(cls.uid == id).first()
+
class Tasks(Base):
__tablename__ = 'staff_tasks'
uid = Column(Integer, primary_key=True)