prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Search submissions by challenge name in submissions table
  Currently, we support searching the submissions by the `participant team name, challenge phase name, created by name and submission status`. We would like to add searching the submissions by `challenge name` and also add the same to default list filtering options.
  Search submissions by challenge name in submissions table
  Currently, we support searching the submissions by the `participant team name, challenge phase name, created by name and submission status`. We would like to add searching the submissions by `challenge name` and also add the same to default list filtering options.
  
  </issue>
  <code>
  [start of apps/jobs/admin.py]
  1 import logging
  2 
  3 from django.contrib import admin
  4 
  5 from base.admin import ImportExportTimeStampedAdmin
  6 
  7 from .models import Submission
  8 from .sender import publish_submission_message
  9 
  10 
  11 logger = logging.getLogger(__name__)
  12 
  13 
  14 @admin.register(Submission)
  15 class SubmissionAdmin(ImportExportTimeStampedAdmin):
  16     actions = ['submit_job_to_worker']
  17     list_display = ('participant_team', 'get_challenge_name_and_id', 'challenge_phase',
  18                     'created_by', 'status', 'is_public', 'submission_number', 'submitted_at',
  19                     'execution_time', 'input_file', 'stdout_file', 'stderr_file',
  20                     'submission_result_file', 'submission_metadata_file',)
  21     list_filter = ('participant_team', 'challenge_phase',
  22                    'status', 'is_public',)
  23     search_fields = ('participant_team__team_name', 'challenge_phase__name',
  24                      'created_by__username', 'status',)
  25 
  26     def get_challenge_name_and_id(self, obj):
  27         """Return challenge name corresponding to phase"""
  28         return "%s - %s" % (obj.challenge_phase.challenge.title, obj.challenge_phase.challenge.id)
  29     get_challenge_name_and_id.short_description = 'Challenge'
  30     get_challenge_name_and_id.admin_order_field = 'challenge_phase__challenge'
  31 
  32     def submit_job_to_worker(self, request, queryset):
  33         for submission in queryset:
  34             challenge_id = submission.challenge_phase.challenge.id
  35             challenge_phase_id = submission.challenge_phase.id
  36             submission_id = submission.id
  37             logger.info("[x] Received submission message with challenge id {}, challenge phase id {}, submission id {}"
  38                         .format(challenge_id, challenge_phase_id, submission_id))
  39             publish_submission_message(challenge_id, challenge_phase_id, submission.id)
  40             queryset.update(status=Submission.SUBMITTED)
  41 
  42     submit_job_to_worker.short_description = "Run selected submissions"
  43
  [end of apps/jobs/admin.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/apps/jobs/admin.py b/apps/jobs/admin.py
  --- a/apps/jobs/admin.py
  +++ b/apps/jobs/admin.py
  @@ -18,10 +18,9 @@
                       'created_by', 'status', 'is_public', 'submission_number', 'submitted_at',
                       'execution_time', 'input_file', 'stdout_file', 'stderr_file',
                       'submission_result_file', 'submission_metadata_file',)
  -    list_filter = ('participant_team', 'challenge_phase',
  -                   'status', 'is_public',)
  +    list_filter = ('challenge_phase__challenge', 'challenge_phase', 'status', 'is_public',)
       search_fields = ('participant_team__team_name', 'challenge_phase__name',
  -                     'created_by__username', 'status',)
  +                     'challenge_phase__challenge__title', 'created_by__username', 'status',)
   
       def get_challenge_name_and_id(self, obj):
           """Return challenge name corresponding to phase"""
  
verification_info: {"golden_diff": "diff --git a/apps/jobs/admin.py b/apps/jobs/admin.py\n--- a/apps/jobs/admin.py\n+++ b/apps/jobs/admin.py\n@@ -18,10 +18,9 @@\n                     'created_by', 'status', 'is_public', 'submission_number', 'submitted_at',\n                     'execution_time', 'input_file', 'stdout_file', 'stderr_file',\n                     'submission_result_file', 'submission_metadata_file',)\n-    list_filter = ('participant_team', 'challenge_phase',\n-                   'status', 'is_public',)\n+    list_filter = ('challenge_phase__challenge', 'challenge_phase', 'status', 'is_public',)\n     search_fields = ('participant_team__team_name', 'challenge_phase__name',\n-                     'created_by__username', 'status',)\n+                     'challenge_phase__challenge__title', 'created_by__username', 'status',)\n \n     def get_challenge_name_and_id(self, obj):\n         \"\"\"Return challenge name corresponding to phase\"\"\"\n", "issue": "Search submissions by challenge name in submissions table\nCurrently, we support searching the submissions by the `participant team name, challenge phase name, created by name and submission status`. We would like to add searching the submissions by `challenge name` and also add the same to default list filtering options.\nSearch submissions by challenge name in submissions table\nCurrently, we support searching the submissions by the `participant team name, challenge phase name, created by name and submission status`. We would like to add searching the submissions by `challenge name` and also add the same to default list filtering options.\n", "before_files": [{"content": "import logging\n\nfrom django.contrib import admin\n\nfrom base.admin import ImportExportTimeStampedAdmin\n\nfrom .models import Submission\nfrom .sender import publish_submission_message\n\n\nlogger = logging.getLogger(__name__)\n\n\n@admin.register(Submission)\nclass SubmissionAdmin(ImportExportTimeStampedAdmin):\n    actions = ['submit_job_to_worker']\n    list_display = ('participant_team', 'get_challenge_name_and_id', 'challenge_phase',\n                    'created_by', 'status', 'is_public', 'submission_number', 'submitted_at',\n                    'execution_time', 'input_file', 'stdout_file', 'stderr_file',\n                    'submission_result_file', 'submission_metadata_file',)\n    list_filter = ('participant_team', 'challenge_phase',\n                   'status', 'is_public',)\n    search_fields = ('participant_team__team_name', 'challenge_phase__name',\n                     'created_by__username', 'status',)\n\n    def get_challenge_name_and_id(self, obj):\n        \"\"\"Return challenge name corresponding to phase\"\"\"\n        return \"%s - %s\" % (obj.challenge_phase.challenge.title, obj.challenge_phase.challenge.id)\n    get_challenge_name_and_id.short_description = 'Challenge'\n    get_challenge_name_and_id.admin_order_field = 'challenge_phase__challenge'\n\n    def submit_job_to_worker(self, request, queryset):\n        for submission in queryset:\n            challenge_id = submission.challenge_phase.challenge.id\n            challenge_phase_id = submission.challenge_phase.id\n            submission_id = submission.id\n            logger.info(\"[x] Received submission message with challenge id {}, challenge phase id {}, submission id {}\"\n                        .format(challenge_id, challenge_phase_id, submission_id))\n            publish_submission_message(challenge_id, challenge_phase_id, submission.id)\n            queryset.update(status=Submission.SUBMITTED)\n\n    submit_job_to_worker.short_description = \"Run selected submissions\"\n", "path": "apps/jobs/admin.py"}]}