listing guests

This commit is contained in:
2025-01-16 18:22:38 +08:00
parent 6ae8448d31
commit 578eddd24d
4 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -71,7 +71,8 @@ def create_listing():
property_type = request.form['property_type']
latitude = request.form.get('latitude')
longitude = request.form.get('longitude')
listing = Listing(title=title, description=description, price=price, location=location, property_type=property_type, host_id=current_user.id, latitude=latitude, longitude=longitude)
guests = request.form['guests']
listing = Listing(title=title, description=description, price=price, location=location, property_type=property_type, host_id=current_user.id, latitude=latitude, longitude=longitude, guests=guests)
db.session.add(listing)
db.session.flush()