diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-02-01 15:30:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-02-01 15:30:36 +0000 |
commit | 0b48d9b6cb6941a9cecedc409ec0968d0b72ec62 (patch) | |
tree | 21d5846ee35b961e153a4207f1b207dcd63650f9 /src/booking/models.py | |
parent | a4ad17749b58b5c9696acace6d3aced372051284 (diff) | |
parent | fef3a855657a7e5c2393dc469690d73bb249bd8f (diff) |
Merge "Allow Users to Delete objects and Cancel Bookings"
Diffstat (limited to 'src/booking/models.py')
-rw-r--r-- | src/booking/models.py | 2 |
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() |