We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tracker link 

![image](https://github.com/hartwork/wnpp.debian.net/assets/127589779/3a692f03-f289-4b59-838b-c449c98d425c)

Both of [these columns](https://github.com/hartwork/wnpp.debian.net/blob/67b24c56c33aeac0238962a0480339a5820b3d79/wnpp_debian_net/templates/wnpp_debian_net/debianwnpp_list.html#L287-L288) link to the same bug report page. Would it be a good idea to change the href on the project name to the tracker.debian.org page of that package?
Tracker link 

![image](https://github.com/hartwork/wnpp.debian.net/assets/127589779/3a692f03-f289-4b59-838b-c449c98d425c)

Both of [these columns](https://github.com/hartwork/wnpp.debian.net/blob/67b24c56c33aeac0238962a0480339a5820b3d79/wnpp_debian_net/templates/wnpp_debian_net/debianwnpp_list.html#L287-L288) link to the same bug report page. Would it be a good idea to change the href on the project name to the tracker.debian.org page of that package?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `wnpp_debian_net/templatetags/debian_urls.py`
Content:
```
1 # Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>
2 # Licensed under GNU Affero GPL v3 or later
3 
4 from django import template
5 
6 register = template.Library()
7 
8 
9 @register.simple_tag
10 def wnpp_issue_url(issue_id):
11     return f'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug={issue_id}'
12
```

Path: `wnpp_debian_net/models.py`
Content:
```
1 # Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>
2 # Licensed under GNU Affero GPL v3 or later
3 
4 from django.db import models
5 from django.db.models import CASCADE, DO_NOTHING, ForeignKey, OneToOneField, TextChoices
6 from django.utils.timezone import now
7 from django.utils.translation import gettext_lazy as _
8 
9 
10 class IssueKind(TextChoices):
11     ITA = 'ITA', _('ITA (Intent to adopt)')
12     ITP = 'ITP', _('ITP (Intent to package)')
13     O_ = 'O', _('O (Orphaned)')
14     RFA = 'RFA', _('RFA (Request for adoption)')
15     RFH = 'RFH', _('RFH (Request for help)')
16     RFP = 'RFP', _('RFP (request for packaging)')
17 
18 
19 class EventKind(TextChoices):
20     MODIFIED = 'MOD', _('modified')
21     OPENED = 'OPEN', _('opened')
22     CLOSED = 'CLOSE', _('closed')
23 
24 
25 class DebianLogIndex(models.Model):
26     log_id = models.AutoField(primary_key=True)
27     ident = models.IntegerField(blank=True, null=True)
28     kind = models.CharField(max_length=3,
29                             choices=IssueKind.choices,
30                             blank=True,
31                             null=True,
32                             db_column='type')
33     project = models.CharField(max_length=255, blank=True, null=True)
34     description = models.CharField(max_length=255, blank=True, null=True)
35     log_stamp = models.DateTimeField(blank=True, null=True)
36     event = models.CharField(max_length=5, choices=EventKind.choices)
37     event_stamp = models.DateTimeField(blank=True, null=True)
38 
39     class Meta:
40         db_table = 'debian_log_index'
41 
42 
43 class DebianLogMods(models.Model):
44     log = OneToOneField(DebianLogIndex,
45                         on_delete=CASCADE,
46                         primary_key=True,
47                         related_name='kind_change',
48                         related_query_name='kind_change')
49     old_kind = models.CharField(max_length=3,
50                                 choices=IssueKind.choices,
51                                 blank=True,
52                                 null=True,
53                                 db_column='before_type')
54     new_kind = models.CharField(max_length=3,
55                                 choices=IssueKind.choices,
56                                 blank=True,
57                                 null=True,
58                                 db_column='after_type')
59 
60     class Meta:
61         db_table = 'debian_log_mods'
62 
63 
64 class DebianPopcon(models.Model):
65     package = models.CharField(primary_key=True, max_length=255)
66     inst = models.IntegerField(blank=True, null=True)
67     vote = models.IntegerField(blank=True, null=True)
68     old = models.IntegerField(blank=True, null=True)
69     recent = models.IntegerField(blank=True, null=True)
70     nofiles = models.IntegerField(blank=True, null=True)
71 
72     class Meta:
73         db_table = 'debian_popcon'
74 
75 
76 class DebianWnpp(models.Model):
77     ident = models.IntegerField(primary_key=True)
78     open_person = models.CharField(max_length=255, blank=True, null=True)
79     open_stamp = models.DateTimeField(blank=True, null=True)
80     mod_stamp = models.DateTimeField(blank=True, null=True)
81     kind = models.CharField(max_length=3, choices=IssueKind.choices, db_column='type')
82     # Original was: project = models.CharField(max_length=255, blank=True, null=True)
83     popcon = ForeignKey(DebianPopcon, on_delete=DO_NOTHING, null=True, db_column='project')
84     description = models.CharField(max_length=255, blank=True, null=True)
85     charge_person = models.CharField(max_length=255, blank=True, null=True)
86     cron_stamp = models.DateTimeField()
87     has_smaller_sibling = models.BooleanField(default=False)
88 
89     class Meta:
90         db_table = 'debian_wnpp'
91 
92     def age_days(self, until=None) -> int:
93         if until is None:
94             until = now()
95         return (until - self.open_stamp).days
96 
97     def dust_days(self, until=None) -> int:
98         if until is None:
99             until = now()
100         return (until - self.mod_stamp).days
101 
102     def __lt__(self, other):
103         return self.ident < other.ident
104
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/wnpp_debian_net/models.py b/wnpp_debian_net/models.py
--- a/wnpp_debian_net/models.py
+++ b/wnpp_debian_net/models.py
@@ -99,5 +99,8 @@
             until = now()
         return (until - self.mod_stamp).days
 
+    def has_existing_package(self):
+        return IssueKind(self.kind) not in (IssueKind.ITP, IssueKind.RFP)
+
     def __lt__(self, other):
         return self.ident < other.ident
diff --git a/wnpp_debian_net/templatetags/debian_urls.py b/wnpp_debian_net/templatetags/debian_urls.py
--- a/wnpp_debian_net/templatetags/debian_urls.py
+++ b/wnpp_debian_net/templatetags/debian_urls.py
@@ -9,3 +9,8 @@
 @register.simple_tag
 def wnpp_issue_url(issue_id):
     return f'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug={issue_id}'
+
+
+@register.simple_tag
+def debian_package_tracker_url(package_name):
+    return f'https://tracker.debian.org/pkg/{package_name}'

{"golden_diff": "diff --git a/wnpp_debian_net/models.py b/wnpp_debian_net/models.py\n--- a/wnpp_debian_net/models.py\n+++ b/wnpp_debian_net/models.py\n@@ -99,5 +99,8 @@\n             until = now()\n         return (until - self.mod_stamp).days\n \n+    def has_existing_package(self):\n+        return IssueKind(self.kind) not in (IssueKind.ITP, IssueKind.RFP)\n+\n     def __lt__(self, other):\n         return self.ident < other.ident\ndiff --git a/wnpp_debian_net/templatetags/debian_urls.py b/wnpp_debian_net/templatetags/debian_urls.py\n--- a/wnpp_debian_net/templatetags/debian_urls.py\n+++ b/wnpp_debian_net/templatetags/debian_urls.py\n@@ -9,3 +9,8 @@\n @register.simple_tag\n def wnpp_issue_url(issue_id):\n     return f'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug={issue_id}'\n+\n+\n+@register.simple_tag\n+def debian_package_tracker_url(package_name):\n+    return f'https://tracker.debian.org/pkg/{package_name}'\n", "issue": "Tracker link \n\r\n![image](https://github.com/hartwork/wnpp.debian.net/assets/127589779/3a692f03-f289-4b59-838b-c449c98d425c)\r\n\r\nBoth of [these columns](https://github.com/hartwork/wnpp.debian.net/blob/67b24c56c33aeac0238962a0480339a5820b3d79/wnpp_debian_net/templates/wnpp_debian_net/debianwnpp_list.html#L287-L288) link to the same bug report page. Would it be a good idea to change the href on the project name to the tracker.debian.org page of that package?\nTracker link \n\r\n![image](https://github.com/hartwork/wnpp.debian.net/assets/127589779/3a692f03-f289-4b59-838b-c449c98d425c)\r\n\r\nBoth of [these columns](https://github.com/hartwork/wnpp.debian.net/blob/67b24c56c33aeac0238962a0480339a5820b3d79/wnpp_debian_net/templates/wnpp_debian_net/debianwnpp_list.html#L287-L288) link to the same bug report page. Would it be a good idea to change the href on the project name to the tracker.debian.org page of that package?\n", "before_files": [{"content": "# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>\n# Licensed under GNU Affero GPL v3 or later\n\nfrom django import template\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef wnpp_issue_url(issue_id):\n    return f'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug={issue_id}'\n", "path": "wnpp_debian_net/templatetags/debian_urls.py"}, {"content": "# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>\n# Licensed under GNU Affero GPL v3 or later\n\nfrom django.db import models\nfrom django.db.models import CASCADE, DO_NOTHING, ForeignKey, OneToOneField, TextChoices\nfrom django.utils.timezone import now\nfrom django.utils.translation import gettext_lazy as _\n\n\nclass IssueKind(TextChoices):\n    ITA = 'ITA', _('ITA (Intent to adopt)')\n    ITP = 'ITP', _('ITP (Intent to package)')\n    O_ = 'O', _('O (Orphaned)')\n    RFA = 'RFA', _('RFA (Request for adoption)')\n    RFH = 'RFH', _('RFH (Request for help)')\n    RFP = 'RFP', _('RFP (request for packaging)')\n\n\nclass EventKind(TextChoices):\n    MODIFIED = 'MOD', _('modified')\n    OPENED = 'OPEN', _('opened')\n    CLOSED = 'CLOSE', _('closed')\n\n\nclass DebianLogIndex(models.Model):\n    log_id = models.AutoField(primary_key=True)\n    ident = models.IntegerField(blank=True, null=True)\n    kind = models.CharField(max_length=3,\n                            choices=IssueKind.choices,\n                            blank=True,\n                            null=True,\n                            db_column='type')\n    project = models.CharField(max_length=255, blank=True, null=True)\n    description = models.CharField(max_length=255, blank=True, null=True)\n    log_stamp = models.DateTimeField(blank=True, null=True)\n    event = models.CharField(max_length=5, choices=EventKind.choices)\n    event_stamp = models.DateTimeField(blank=True, null=True)\n\n    class Meta:\n        db_table = 'debian_log_index'\n\n\nclass DebianLogMods(models.Model):\n    log = OneToOneField(DebianLogIndex,\n                        on_delete=CASCADE,\n                        primary_key=True,\n                        related_name='kind_change',\n                        related_query_name='kind_change')\n    old_kind = models.CharField(max_length=3,\n                                choices=IssueKind.choices,\n                                blank=True,\n                                null=True,\n                                db_column='before_type')\n    new_kind = models.CharField(max_length=3,\n                                choices=IssueKind.choices,\n                                blank=True,\n                                null=True,\n                                db_column='after_type')\n\n    class Meta:\n        db_table = 'debian_log_mods'\n\n\nclass DebianPopcon(models.Model):\n    package = models.CharField(primary_key=True, max_length=255)\n    inst = models.IntegerField(blank=True, null=True)\n    vote = models.IntegerField(blank=True, null=True)\n    old = models.IntegerField(blank=True, null=True)\n    recent = models.IntegerField(blank=True, null=True)\n    nofiles = models.IntegerField(blank=True, null=True)\n\n    class Meta:\n        db_table = 'debian_popcon'\n\n\nclass DebianWnpp(models.Model):\n    ident = models.IntegerField(primary_key=True)\n    open_person = models.CharField(max_length=255, blank=True, null=True)\n    open_stamp = models.DateTimeField(blank=True, null=True)\n    mod_stamp = models.DateTimeField(blank=True, null=True)\n    kind = models.CharField(max_length=3, choices=IssueKind.choices, db_column='type')\n    # Original was: project = models.CharField(max_length=255, blank=True, null=True)\n    popcon = ForeignKey(DebianPopcon, on_delete=DO_NOTHING, null=True, db_column='project')\n    description = models.CharField(max_length=255, blank=True, null=True)\n    charge_person = models.CharField(max_length=255, blank=True, null=True)\n    cron_stamp = models.DateTimeField()\n    has_smaller_sibling = models.BooleanField(default=False)\n\n    class Meta:\n        db_table = 'debian_wnpp'\n\n    def age_days(self, until=None) -> int:\n        if until is None:\n            until = now()\n        return (until - self.open_stamp).days\n\n    def dust_days(self, until=None) -> int:\n        if until is None:\n            until = now()\n        return (until - self.mod_stamp).days\n\n    def __lt__(self, other):\n        return self.ident < other.ident\n", "path": "wnpp_debian_net/models.py"}], "after_files": [{"content": "# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>\n# Licensed under GNU Affero GPL v3 or later\n\nfrom django import template\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef wnpp_issue_url(issue_id):\n    return f'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug={issue_id}'\n\n\n@register.simple_tag\ndef debian_package_tracker_url(package_name):\n    return f'https://tracker.debian.org/pkg/{package_name}'\n", "path": "wnpp_debian_net/templatetags/debian_urls.py"}, {"content": "# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>\n# Licensed under GNU Affero GPL v3 or later\n\nfrom django.db import models\nfrom django.db.models import CASCADE, DO_NOTHING, ForeignKey, OneToOneField, TextChoices\nfrom django.utils.timezone import now\nfrom django.utils.translation import gettext_lazy as _\n\n\nclass IssueKind(TextChoices):\n    ITA = 'ITA', _('ITA (Intent to adopt)')\n    ITP = 'ITP', _('ITP (Intent to package)')\n    O_ = 'O', _('O (Orphaned)')\n    RFA = 'RFA', _('RFA (Request for adoption)')\n    RFH = 'RFH', _('RFH (Request for help)')\n    RFP = 'RFP', _('RFP (request for packaging)')\n\n\nclass EventKind(TextChoices):\n    MODIFIED = 'MOD', _('modified')\n    OPENED = 'OPEN', _('opened')\n    CLOSED = 'CLOSE', _('closed')\n\n\nclass DebianLogIndex(models.Model):\n    log_id = models.AutoField(primary_key=True)\n    ident = models.IntegerField(blank=True, null=True)\n    kind = models.CharField(max_length=3,\n                            choices=IssueKind.choices,\n                            blank=True,\n                            null=True,\n                            db_column='type')\n    project = models.CharField(max_length=255, blank=True, null=True)\n    description = models.CharField(max_length=255, blank=True, null=True)\n    log_stamp = models.DateTimeField(blank=True, null=True)\n    event = models.CharField(max_length=5, choices=EventKind.choices)\n    event_stamp = models.DateTimeField(blank=True, null=True)\n\n    class Meta:\n        db_table = 'debian_log_index'\n\n\nclass DebianLogMods(models.Model):\n    log = OneToOneField(DebianLogIndex,\n                        on_delete=CASCADE,\n                        primary_key=True,\n                        related_name='kind_change',\n                        related_query_name='kind_change')\n    old_kind = models.CharField(max_length=3,\n                                choices=IssueKind.choices,\n                                blank=True,\n                                null=True,\n                                db_column='before_type')\n    new_kind = models.CharField(max_length=3,\n                                choices=IssueKind.choices,\n                                blank=True,\n                                null=True,\n                                db_column='after_type')\n\n    class Meta:\n        db_table = 'debian_log_mods'\n\n\nclass DebianPopcon(models.Model):\n    package = models.CharField(primary_key=True, max_length=255)\n    inst = models.IntegerField(blank=True, null=True)\n    vote = models.IntegerField(blank=True, null=True)\n    old = models.IntegerField(blank=True, null=True)\n    recent = models.IntegerField(blank=True, null=True)\n    nofiles = models.IntegerField(blank=True, null=True)\n\n    class Meta:\n        db_table = 'debian_popcon'\n\n\nclass DebianWnpp(models.Model):\n    ident = models.IntegerField(primary_key=True)\n    open_person = models.CharField(max_length=255, blank=True, null=True)\n    open_stamp = models.DateTimeField(blank=True, null=True)\n    mod_stamp = models.DateTimeField(blank=True, null=True)\n    kind = models.CharField(max_length=3, choices=IssueKind.choices, db_column='type')\n    # Original was: project = models.CharField(max_length=255, blank=True, null=True)\n    popcon = ForeignKey(DebianPopcon, on_delete=DO_NOTHING, null=True, db_column='project')\n    description = models.CharField(max_length=255, blank=True, null=True)\n    charge_person = models.CharField(max_length=255, blank=True, null=True)\n    cron_stamp = models.DateTimeField()\n    has_smaller_sibling = models.BooleanField(default=False)\n\n    class Meta:\n        db_table = 'debian_wnpp'\n\n    def age_days(self, until=None) -> int:\n        if until is None:\n            until = now()\n        return (until - self.open_stamp).days\n\n    def dust_days(self, until=None) -> int:\n        if until is None:\n            until = now()\n        return (until - self.mod_stamp).days\n\n    def has_existing_package(self):\n        return IssueKind(self.kind) not in (IssueKind.ITP, IssueKind.RFP)\n\n    def __lt__(self, other):\n        return self.ident < other.ident\n", "path": "wnpp_debian_net/models.py"}]}