From f4e8248d126921603280dffab0e907366391bb72 Mon Sep 17 00:00:00 2001 From: maxbr Date: Mon, 22 Aug 2016 18:59:47 +0200 Subject: Create Jira issue for new booking JIRA: RELENG-12 The issue is assigned to the lab owner and to the POD Access Request Component. The pgp and ssh keys are uploaded to jira as an attachement. Signed-off-by: maxbr --- pharos-dashboard/booking/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pharos-dashboard/booking/models.py') diff --git a/pharos-dashboard/booking/models.py b/pharos-dashboard/booking/models.py index 719dd9b..8011fa4 100644 --- a/pharos-dashboard/booking/models.py +++ b/pharos-dashboard/booking/models.py @@ -10,6 +10,7 @@ class Booking(models.Model): resource = models.ForeignKey(Resource, models.PROTECT) start = models.DateTimeField() end = models.DateTimeField() + jira_issue_id = models.IntegerField(null=True) purpose = models.CharField(max_length=300, blank=False) @@ -25,11 +26,10 @@ class Booking(models.Model): if user.has_perm('booking.add_booking'): return True # Check if User owns this resource - if user in self.resource.owners.all(): + if user == self.resource.owner: return True return False - def save(self, *args, **kwargs): """ Save the booking if self.user is authorized and there is no overlapping booking. -- cgit 1.2.3-korg