From 631fc8a3ebaf74dc609a445dc0b11b73eb0eab02 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Tue, 3 Mar 2015 18:12:11 +0100 Subject: adding some docstring --- pyaggr3g470r/controllers/abstract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyaggr3g470r/controllers') diff --git a/pyaggr3g470r/controllers/abstract.py b/pyaggr3g470r/controllers/abstract.py index ebb73e30..a99e67f3 100644 --- a/pyaggr3g470r/controllers/abstract.py +++ b/pyaggr3g470r/controllers/abstract.py @@ -7,7 +7,7 @@ logger = logging.getLogger(__name__) class AbstractController(object): - _db_cls = None + _db_cls = None # reference to the database class _user_id_key = 'user_id' def __init__(self, user_id): @@ -48,7 +48,7 @@ class AbstractController(object): return obj def create(self, **attrs): - attrs['user_id'] = self.user_id + attrs[self._user_id_key] = self.user_id obj = self._db_cls(**attrs) db.session.add(obj) db.session.commit() -- cgit