prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Updating promo requests 
  **Describe the bug**
  It is not possible to update the promo request within a week of the publish date 
  
  **How to reproduce** 
  Create a promo request 
  Try to update the designer within a week to publish date 
  
  **Expected behavior** 
  The request can only be created more than a week before the publishing date, but assigned to, status and drive folder can always be edited. 
  
  </issue>
  <code>
  [start of website/promotion/forms.py]
  1 from django import forms
  2 from django.utils import timezone
  3 
  4 from promotion.models import PromotionRequest
  5 from thaliawebsite.settings import PROMO_PUBLISH_DATE_TIMEDELTA
  6 
  7 
  8 class PromotionRequestForm(forms.ModelForm):
  9     class Meta:
  10         model = PromotionRequest
  11         fields = [
  12             "event",
  13             "publish_date",
  14             "channel",
  15             "assigned_to",
  16             "status",
  17             "drive_folder",
  18             "remarks",
  19         ]
  20 
  21     def clean_publish_date(self):
  22         publish_date = self.cleaned_data.get("publish_date")
  23         create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA
  24         if timezone.localdate() > create_time_minimum:
  25             raise forms.ValidationError(
  26                 "Publish date cannot be within a week from now."
  27             )
  28         if "publish_date" in self.changed_data:
  29             create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA
  30             if timezone.localdate() > create_time_minimum:
  31                 raise forms.ValidationError(
  32                     "Publish date cannot be within a week from now."
  33                 )
  34         return publish_date
  35
  [end of website/promotion/forms.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/website/promotion/forms.py b/website/promotion/forms.py
  --- a/website/promotion/forms.py
  +++ b/website/promotion/forms.py
  @@ -20,11 +20,6 @@
   
       def clean_publish_date(self):
           publish_date = self.cleaned_data.get("publish_date")
  -        create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA
  -        if timezone.localdate() > create_time_minimum:
  -            raise forms.ValidationError(
  -                "Publish date cannot be within a week from now."
  -            )
           if "publish_date" in self.changed_data:
               create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA
               if timezone.localdate() > create_time_minimum:
  
verification_info: {"golden_diff": "diff --git a/website/promotion/forms.py b/website/promotion/forms.py\n--- a/website/promotion/forms.py\n+++ b/website/promotion/forms.py\n@@ -20,11 +20,6 @@\n \n     def clean_publish_date(self):\n         publish_date = self.cleaned_data.get(\"publish_date\")\n-        create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA\n-        if timezone.localdate() > create_time_minimum:\n-            raise forms.ValidationError(\n-                \"Publish date cannot be within a week from now.\"\n-            )\n         if \"publish_date\" in self.changed_data:\n             create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA\n             if timezone.localdate() > create_time_minimum:\n", "issue": "Updating promo requests \n**Describe the bug**\r\nIt is not possible to update the promo request within a week of the publish date \r\n\r\n**How to reproduce** \r\nCreate a promo request \r\nTry to update the designer within a week to publish date \r\n\r\n**Expected behavior** \r\nThe request can only be created more than a week before the publishing date, but assigned to, status and drive folder can always be edited. \n", "before_files": [{"content": "from django import forms\nfrom django.utils import timezone\n\nfrom promotion.models import PromotionRequest\nfrom thaliawebsite.settings import PROMO_PUBLISH_DATE_TIMEDELTA\n\n\nclass PromotionRequestForm(forms.ModelForm):\n    class Meta:\n        model = PromotionRequest\n        fields = [\n            \"event\",\n            \"publish_date\",\n            \"channel\",\n            \"assigned_to\",\n            \"status\",\n            \"drive_folder\",\n            \"remarks\",\n        ]\n\n    def clean_publish_date(self):\n        publish_date = self.cleaned_data.get(\"publish_date\")\n        create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA\n        if timezone.localdate() > create_time_minimum:\n            raise forms.ValidationError(\n                \"Publish date cannot be within a week from now.\"\n            )\n        if \"publish_date\" in self.changed_data:\n            create_time_minimum = publish_date - PROMO_PUBLISH_DATE_TIMEDELTA\n            if timezone.localdate() > create_time_minimum:\n                raise forms.ValidationError(\n                    \"Publish date cannot be within a week from now.\"\n                )\n        return publish_date\n", "path": "website/promotion/forms.py"}]}