diff options
author | 2016-08-22 18:59:47 +0200 | |
---|---|---|
committer | 2016-08-22 19:04:19 +0200 | |
commit | f4e8248d126921603280dffab0e907366391bb72 (patch) | |
tree | 35b94e14b2e024bafbc8946b2fe50d8aa34e8357 /pharos-dashboard/booking/models.py | |
parent | b426489bafaa4d6d09d1b6cefbbd9a17509090d9 (diff) |
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 <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'pharos-dashboard/booking/models.py')
-rw-r--r-- | pharos-dashboard/booking/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
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. |