Fakultas Ilmu Komputer UI

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

Merge branch 'bungamaku/19/biaya-pesan-hampers' into 'dev'

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

See merge request !19
parents 58c5e97e fa932a22
Pipeline #81797 passed with stages
in 2 minutes and 23 seconds
......@@ -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