diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dashboard/admin_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dashboard/admin_utils.py b/src/dashboard/admin_utils.py index 6d990c9..222ccd3 100644 --- a/src/dashboard/admin_utils.py +++ b/src/dashboard/admin_utils.py @@ -382,3 +382,9 @@ def add_server(profile, uname, interfaces, lab_username="unh_iol", vendor="unkno server.interfaces.add(iface) server.save() + + +def extend_booking(booking_id, days=0, hours=0, minutes=0, weeks=0): + booking = Booking.objects.get(id=booking_id) + booking.end = booking.end + timedelta(days=days, hours=hours, minutes=minutes, weeks=weeks) + booking.save() |