diff options
author | 2016-08-22 18:59:47 +0200 | |
---|---|---|
committer | 2016-08-22 19:04:19 +0200 | |
commit | 6c993d9e3bd9a7c0fb94d7056e664648dd8d85cb (patch) | |
tree | 8ae572cb4454cd9de3aca27b88d08dadf76cbdf3 /tools/pharos-dashboard/booking/models.py | |
parent | 7528d995257181b91c0d82dd82a2aa0f832ef63f (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 'tools/pharos-dashboard/booking/models.py')
-rw-r--r-- | tools/pharos-dashboard/booking/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pharos-dashboard/booking/models.py b/tools/pharos-dashboard/booking/models.py index 719dd9bf..8011fa41 100644 --- a/tools/pharos-dashboard/booking/models.py +++ b/tools/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. |