aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking
diff options
context:
space:
mode:
Diffstat (limited to 'src/booking')
-rw-r--r--src/booking/models.py6
-rw-r--r--src/booking/quick_deployer.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/booking/models.py b/src/booking/models.py
index cf8bf1d..cfdf7bc 100644
--- a/src/booking/models.py
+++ b/src/booking/models.py
@@ -21,7 +21,7 @@ class Booking(models.Model):
# All bookings are owned by the user who requested it
owner = models.ForeignKey(User, on_delete=models.PROTECT, related_name='owner')
# an owner can add other users to the booking
- collaborators = models.ManyToManyField(User, related_name='collaborators')
+ collaborators = models.ManyToManyField(User, blank=True, related_name='collaborators')
# start and end time
start = models.DateTimeField()
end = models.DateTimeField()
@@ -32,8 +32,8 @@ class Booking(models.Model):
# bookings can be extended a limited number of times
ext_count = models.IntegerField(default=2)
# the hardware that the user has booked
- resource = models.ForeignKey(ResourceBundle, on_delete=models.SET_NULL, null=True)
- opnfv_config = models.ForeignKey(OPNFVConfig, on_delete=models.SET_NULL, null=True)
+ resource = models.ForeignKey(ResourceBundle, on_delete=models.SET_NULL, null=True, blank=True)
+ opnfv_config = models.ForeignKey(OPNFVConfig, on_delete=models.SET_NULL, null=True, blank=True)
project = models.CharField(max_length=100, default="", blank=True, null=True)
lab = models.ForeignKey(Lab, null=True, on_delete=models.SET_NULL)
pdf = models.TextField(blank=True, default="")
diff --git a/src/booking/quick_deployer.py b/src/booking/quick_deployer.py
index 0d4e5ea..8b3af6c 100644
--- a/src/booking/quick_deployer.py
+++ b/src/booking/quick_deployer.py
@@ -87,7 +87,7 @@ def update_template(old_template, image, hostname, user):
Network.objects.create(
name=old_network.name,
bundle=template,
- is_public=False
+ is_public=old_network.is_public
)
# We are assuming there is only one opnfv config per public resource template
old_opnfv = template.opnfv_config.first()