fix
This commit is contained in:
@@ -71,6 +71,7 @@ class MultipleOrderCreateSerializer(serializers.Serializer):
|
||||
resources = validated_data.pop('resources')
|
||||
common_date = validated_data.get('date')
|
||||
orders = []
|
||||
user = self.context.get('user')
|
||||
|
||||
for resource in resources:
|
||||
order = Order(
|
||||
@@ -88,10 +89,9 @@ class MultipleOrderCreateSerializer(serializers.Serializer):
|
||||
{user.full_name} {order.project_folder.name} uchun {order.wherehouse.name} ombor ga {order.quantity} {order.unity.value} {order.product.name} ga buyurtma berdi. Buyurtma
|
||||
yetkazish sanasi {common_date}
|
||||
"""
|
||||
notify_user(user=self.context.get("user"), title="Ta'minot",body=body)
|
||||
|
||||
notify_user(user=user, title="Ta'minot",body=body)
|
||||
|
||||
created_orders = Order.objects.bulk_create(orders)
|
||||
user = self.context.get('user')
|
||||
return created_orders
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user