def save_feed(self,feed_name,feed_url,feed_author=None): feed =Feed(feed_name=feed_name,feed_url=feed_url) if feed_author: feed.feed_author=feed_author self.db.add(feed) self.db.commit()