I'm a bit stuck with my code:
我的代码有点困惑:
def setVenueImage(img):
img = images.Image(img.read())
x, y = photo_utils.getIdealResolution(img.width, img.height)
img.resize(x, y)
img.execute_transforms()
venue_obj = getVenueSingletonObject()
if venue_obj is None:
venue_obj = Venue(images = [img])
else:
venue_obj.images.append(img)
db.put(venue_obj)
def