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
def create(self): db_session.add(self) db_session.commit() return True