Set VM order starting date on creation
This commit is contained in:
parent
3a37343a73
commit
276c7e9901
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
from django.db import transaction
|
||||
from django.shortcuts import render
|
||||
from django.utils import timezone
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
@ -118,7 +119,8 @@ class VMProductViewSet(ProductViewSet):
|
|||
# Create base order.
|
||||
order = Order.objects.create(
|
||||
recurring_period=order_recurring_period,
|
||||
owner=request.user
|
||||
owner=request.user,
|
||||
starting_date=timezone.now()
|
||||
)
|
||||
order.save()
|
||||
|
||||
|
|
Loading…
Reference in a new issue