Skip to content

Commit

Permalink
Reversed changes made based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff McMillen authored and Jeff McMillen committed Dec 18, 2024
1 parent a11bce4 commit 0d07b21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/portal/apps/onboarding/steps/project_membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def send_project_request(self, request):
username=self.user.username
),
Text=ticket_text,
Requestor=self.user.email,
Requestors=self.user.email,
CF_resource=settings.RT_TAG
)
tracker.logout()
Expand Down
2 changes: 1 addition & 1 deletion server/portal/apps/tickets/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def post(self, request):
data = request.POST.copy()
subject = data.get('subject')
problem_description = data.get('problem_description')
cc = data.get('cc', [''])
cc = data.get('cc', [])
attachments = [(f.name, ContentFile(f.read()), f.content_type)
for f in request.FILES.getlist('attachments')]
info = request.GET.get('info', "None")
Expand Down
8 changes: 4 additions & 4 deletions server/portal/apps/tickets/rtUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def __init__(self):

def getUserTickets(self, userEmail, status="ALL"):
if not status == "ALL":
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestor__exact=userEmail, Status__exact=status,
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestors__exact=userEmail, Status__exact=status,
order='-LastUpdated')
else:
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestor__exact=userEmail, order='-LastUpdated')
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestors__exact=userEmail, order='-LastUpdated')

for ticket in ticket_list:
ticket['id'] = ticket['id'].replace('ticket/', '')
Expand All @@ -42,7 +42,7 @@ def getTicketHistory(self, ticket_id):

return ticketHistory

def create_ticket(self, attachments, subject, problem_description, requestor, cc=[]):
def create_ticket(self, attachments, subject, problem_description, requestor, cc):
return self.tracker.create_ticket(Queue=self.rtQueue,
files=attachments,
Subject=subject,
Expand All @@ -60,7 +60,7 @@ def replyToTicket(self, ticket_id, reply_text, files=[]):
def hasAccess(self, ticket_id, user=None):
if user and ticket_id:
ticket = self.tracker.get_ticket(ticket_id)
if DjangoRt.contains_user(ticket.get('Requestor', ''), user) or DjangoRt.contains_user(ticket.get('Cc', ''), user):
if DjangoRt.contains_user(ticket.get('Requestors', ''), user) or DjangoRt.contains_user(ticket.get('Cc', ''), user):
return True

return False
Expand Down

0 comments on commit 0d07b21

Please sign in to comment.