def create_character(self, username, character):
    self.assert_valid('accounts', username, 'characters')
    self.db['accounts'][username]['characters'][character['id']] = character
    self.save_db()
def create_character(self, username, character):
    self.assert_valid('accounts', username, 'characters')
    self.db['accounts'][username]['characters'][character['id']] = character
    self.save_db()