Example #1
0
def updateUserRating(userID, increment):
	user = checkForUser(userID)
	if user:
		if user.rating:
			user.rating += increment
		else:
			user.rating = increment
		user.put()
		checkForUser(userID, forceRefresh = True)
Example #2
0
def getUserRating(userID):
	user = checkForUser(userID)
	if user:
		if user.rating is None:
			rating = 0
		else:
			rating = user.rating
	else:
		rating = 0
	return rating