aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking/models.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-29 10:05:27 -0500
committerParker Berberian <pberberian@iol.unh.edu>2019-01-29 10:05:27 -0500
commitfef3a855657a7e5c2393dc469690d73bb249bd8f (patch)
treeaa9d47271c112a8a81cb1768292bae7206bfbe58 /src/booking/models.py
parent2c5650cad195f0bd78fb201ebbddc2afef96f752 (diff)
Allow Users to Delete objects and Cancel Bookings
A user can now delete thier own resources, configs, and snapshots as well as cancelling bookings. Change-Id: Ic8e4751feeb0b8fa0d76816b8df2d16729ad2828 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/booking/models.py')
-rw-r--r--src/booking/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/booking/models.py b/src/booking/models.py
index 0972922..8612abd 100644
--- a/src/booking/models.py
+++ b/src/booking/models.py
@@ -18,7 +18,7 @@ import resource_inventory.resource_manager
class Booking(models.Model):
id = models.AutoField(primary_key=True)
- owner = models.ForeignKey(User, models.CASCADE, related_name='owner')
+ owner = models.ForeignKey(User, on_delete=models.PROTECT, related_name='owner')
collaborators = models.ManyToManyField(User, related_name='collaborators')
start = models.DateTimeField()
end = models.DateTimeField()