Fakultas Ilmu Komputer UI

Commit fa932a22 authored by Bunga Amalia Kurniawati's avatar Bunga Amalia Kurniawati 🌺
Browse files

PBI-15: Membuat variable boolean hampers, biaya & pesan hampers

parent 6b28a98e
......@@ -114,6 +114,14 @@ class ProductList(generics.ListCreateAPIView):
validated_hampers_price = serializer.validated_data['hampers_price']
except KeyError:
pass
try:
validated_is_hampers=serializer.validated_data['is_hampers']
except KeyError:
pass
try:
validated_hampers_price = serializer.validated_data['hampers_price']
except KeyError:
pass
if serializer.validated_data['preorder']:
product = models.Product.objects.create(
name=serializer.validated_data['name'],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment