Example #1
0
 def create(self):
     # TODO: move this out of here and find out how to do custom
     # getters and setters with SQLAlchemy
     if not self.entry_type in EntryType.all():
         raise Exception('Invalid EntryType')
         return False
     db_session.add(self)
     db_session.commit()
     return True
Example #2
0
 def create(self):
     db_session.add(self)
     db_session.commit()
     return True