We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add the unique ticket code into the downlad CSV file
The CSV download file of the attendee list does not include the numbers on the QR Code. Please add this field "Ticket-ID".

The ticket ID has the following format: 135ccbd7-9b23-4a52-a7fd-326fec1b2c1c
Whereas the order has a format like this: #O1691408152-34896

![Screenshot from 2024-03-18 11-40-16](https://github.com/fossasia/open-event-server/assets/1583873/97568f6a-bd5a-4706-899f-64400c2f4da6)

Expected: The exported CSV should have a table column "Ticket ID" with the ticket ID number that is encoded in the QR code as well.

![Screenshot from 2024-03-18 11-48-30](https://github.com/fossasia/open-event-server/assets/1583873/be8e84dd-7088-4a71-8d03-a89d4414904e)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `app/models/ticket_holder.py`
Content:
```
1 import base64
2 from dataclasses import dataclass
3 from datetime import datetime
4 from io import BytesIO
5 
6 import qrcode
7 from citext import CIText
8 
9 from app.api.helpers.storage import UPLOAD_PATHS, generate_hash
10 from app.models import db
11 from app.models.base import SoftDeletionModel
12 
13 
14 @dataclass(init=False, unsafe_hash=True)
15 class TicketHolder(SoftDeletionModel):
16     __tablename__ = "ticket_holders"
17 
18     id: int = db.Column(db.Integer, primary_key=True)
19     firstname: str = db.Column(db.String)
20     lastname: str = db.Column(db.String)
21     email: str = db.Column(CIText)
22     address: str = db.Column(db.String)
23     city: str = db.Column(db.String)
24     state: str = db.Column(db.String)
25     country: str = db.Column(db.String)
26     job_title: str = db.Column(db.String)
27     phone: str = db.Column(db.String)
28     tax_business_info: str = db.Column(db.String)
29     billing_address: str = db.Column(db.String)
30     home_address: str = db.Column(db.String)
31     shipping_address: str = db.Column(db.String)
32     company: str = db.Column(db.String)
33     work_address: str = db.Column(db.String)
34     work_phone: str = db.Column(db.String)
35     website: str = db.Column(db.String)
36     blog: str = db.Column(db.String)
37     twitter: str = db.Column(db.String)
38     facebook: str = db.Column(db.String)
39     instagram: str = db.Column(db.String)
40     linkedin: str = db.Column(db.String)
41     github: str = db.Column(db.String)
42     gender: str = db.Column(db.String)
43     accept_video_recording: bool = db.Column(db.Boolean)
44     accept_share_details: bool = db.Column(db.Boolean)
45     accept_receive_emails: bool = db.Column(db.Boolean)
46     age_group: str = db.Column(db.String)
47     home_wiki: str = db.Column(db.String)
48     wiki_scholarship: str = db.Column(db.String)
49     birth_date: datetime = db.Column(db.DateTime(timezone=True))
50     pdf_url: str = db.Column(db.String)
51     ticket_id: int = db.Column(
52         db.Integer, db.ForeignKey('tickets.id', ondelete='CASCADE'), nullable=False
53     )
54     order_id: int = db.Column(db.Integer, db.ForeignKey('orders.id', ondelete='CASCADE'))
55     is_checked_in: bool = db.Column(db.Boolean, default=False)
56     is_checked_out: bool = db.Column(db.Boolean, default=False)
57     is_registered: bool = db.Column(db.Boolean, default=False)
58     device_name_checkin: str = db.Column(db.String)
59     checkin_times: str = db.Column(db.String)
60     checkout_times: str = db.Column(db.String)
61     register_times: str = db.Column(db.String)
62     attendee_notes: str = db.Column(db.String)
63     event_id: int = db.Column(
64         db.Integer, db.ForeignKey('events.id', ondelete='CASCADE'), nullable=False
65     )
66     created_at: datetime = db.Column(db.DateTime(timezone=True), default=datetime.utcnow)
67     modified_at: datetime = db.Column(
68         db.DateTime(timezone=True), default=datetime.utcnow, onupdate=datetime.utcnow
69     )
70     complex_field_values: str = db.Column(db.JSON)
71     is_consent_of_refund_policy: bool = db.Column(db.Boolean, default=False)
72     native_language: str = db.Column(db.JSON)
73     fluent_language: str = db.Column(db.JSON)
74     user = db.relationship(
75         'User',
76         foreign_keys=[email],
77         primaryjoin='User.email == TicketHolder.email',
78         viewonly=True,
79         backref='attendees',
80         sync_backref=False,
81     )
82     order = db.relationship('Order', backref='ticket_holders')
83     ticket = db.relationship('Ticket', backref='ticket_holders')
84     is_consent_form_field: bool = db.Column(db.Boolean, default=False)
85     is_consent_form_field_photo: bool = db.Column(db.Boolean, default=False)
86     is_consent_form_field_email: bool = db.Column(db.Boolean, default=False)
87     is_badge_printed: bool = db.Column(db.Boolean, default=False)
88     badge_printed_at: datetime = db.Column(db.DateTime(timezone=True))
89     is_discount_applied: bool = db.Column(db.Boolean, default=False)
90     is_access_code_applied: bool = db.Column(db.Boolean, default=False)
91     tag_id: int = db.Column(db.Integer, db.ForeignKey('tags.id', ondelete='CASCADE'))
92     tag = db.relationship('Tag', backref='ticket_holders')
93 
94     @property
95     def name(self):
96         firstname = self.firstname if self.firstname else ''
97         lastname = self.lastname if self.lastname else ''
98         if firstname and lastname:
99             return f'{firstname} {lastname}'
100         else:
101             return ''
102 
103     @property
104     def qr_code(self):
105         qr = qrcode.QRCode(
106             version=1,
107             error_correction=qrcode.constants.ERROR_CORRECT_L,
108             box_size=10,
109             border=0,
110         )
111         qr.add_data(self.order.identifier + "-" + str(self.id))
112         qr.make(fit=True)
113         img = qr.make_image()
114 
115         buffer = BytesIO()
116         img.save(buffer, format="JPEG")
117         img_str = str(base64.b64encode(buffer.getvalue()), 'utf-8')
118         return img_str
119 
120     @property
121     def serialize(self):
122         """Return object data in easily serializable format"""
123         return {
124             'id': self.id,
125             'firstname': self.firstname,
126             'lastname': self.lastname,
127             'email': self.email,
128             'city': self.city,
129             'address': self.address,
130             'state': self.state,
131             'country': self.country,
132             'company': self.company,
133             'taxBusinessInfo': self.tax_business_info,
134         }
135 
136     @property
137     def pdf_url_path(self) -> str:
138         key = UPLOAD_PATHS['pdf']['tickets_all'].format(
139             identifier=self.order.identifier, extra_identifier=self.id
140         )
141         return (
142             f'generated/tickets/{key}/{generate_hash(key)}/'
143             + self.order.identifier
144             + '.pdf'
145         )
146
```
--- 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/app/models/ticket_holder.py b/app/models/ticket_holder.py
--- a/app/models/ticket_holder.py
+++ b/app/models/ticket_holder.py
@@ -108,7 +108,7 @@
             box_size=10,
             border=0,
         )
-        qr.add_data(self.order.identifier + "-" + str(self.id))
+        qr.add_data(self.order.identifier)
         qr.make(fit=True)
         img = qr.make_image()

{"golden_diff": "diff --git a/app/models/ticket_holder.py b/app/models/ticket_holder.py\n--- a/app/models/ticket_holder.py\n+++ b/app/models/ticket_holder.py\n@@ -108,7 +108,7 @@\n             box_size=10,\n             border=0,\n         )\n-        qr.add_data(self.order.identifier + \"-\" + str(self.id))\n+        qr.add_data(self.order.identifier)\n         qr.make(fit=True)\n         img = qr.make_image()\n", "issue": "Add the unique ticket code into the downlad CSV file\nThe CSV download file of the attendee list does not include the numbers on the QR Code. Please add this field \"Ticket-ID\".\r\n\r\nThe ticket ID has the following format: 135ccbd7-9b23-4a52-a7fd-326fec1b2c1c\r\nWhereas the order has a format like this: #O1691408152-34896\r\n\r\n![Screenshot from 2024-03-18 11-40-16](https://github.com/fossasia/open-event-server/assets/1583873/97568f6a-bd5a-4706-899f-64400c2f4da6)\r\n\r\nExpected: The exported CSV should have a table column \"Ticket ID\" with the ticket ID number that is encoded in the QR code as well.\r\n\r\n![Screenshot from 2024-03-18 11-48-30](https://github.com/fossasia/open-event-server/assets/1583873/be8e84dd-7088-4a71-8d03-a89d4414904e)\r\n\n", "before_files": [{"content": "import base64\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom io import BytesIO\n\nimport qrcode\nfrom citext import CIText\n\nfrom app.api.helpers.storage import UPLOAD_PATHS, generate_hash\nfrom app.models import db\nfrom app.models.base import SoftDeletionModel\n\n\n@dataclass(init=False, unsafe_hash=True)\nclass TicketHolder(SoftDeletionModel):\n    __tablename__ = \"ticket_holders\"\n\n    id: int = db.Column(db.Integer, primary_key=True)\n    firstname: str = db.Column(db.String)\n    lastname: str = db.Column(db.String)\n    email: str = db.Column(CIText)\n    address: str = db.Column(db.String)\n    city: str = db.Column(db.String)\n    state: str = db.Column(db.String)\n    country: str = db.Column(db.String)\n    job_title: str = db.Column(db.String)\n    phone: str = db.Column(db.String)\n    tax_business_info: str = db.Column(db.String)\n    billing_address: str = db.Column(db.String)\n    home_address: str = db.Column(db.String)\n    shipping_address: str = db.Column(db.String)\n    company: str = db.Column(db.String)\n    work_address: str = db.Column(db.String)\n    work_phone: str = db.Column(db.String)\n    website: str = db.Column(db.String)\n    blog: str = db.Column(db.String)\n    twitter: str = db.Column(db.String)\n    facebook: str = db.Column(db.String)\n    instagram: str = db.Column(db.String)\n    linkedin: str = db.Column(db.String)\n    github: str = db.Column(db.String)\n    gender: str = db.Column(db.String)\n    accept_video_recording: bool = db.Column(db.Boolean)\n    accept_share_details: bool = db.Column(db.Boolean)\n    accept_receive_emails: bool = db.Column(db.Boolean)\n    age_group: str = db.Column(db.String)\n    home_wiki: str = db.Column(db.String)\n    wiki_scholarship: str = db.Column(db.String)\n    birth_date: datetime = db.Column(db.DateTime(timezone=True))\n    pdf_url: str = db.Column(db.String)\n    ticket_id: int = db.Column(\n        db.Integer, db.ForeignKey('tickets.id', ondelete='CASCADE'), nullable=False\n    )\n    order_id: int = db.Column(db.Integer, db.ForeignKey('orders.id', ondelete='CASCADE'))\n    is_checked_in: bool = db.Column(db.Boolean, default=False)\n    is_checked_out: bool = db.Column(db.Boolean, default=False)\n    is_registered: bool = db.Column(db.Boolean, default=False)\n    device_name_checkin: str = db.Column(db.String)\n    checkin_times: str = db.Column(db.String)\n    checkout_times: str = db.Column(db.String)\n    register_times: str = db.Column(db.String)\n    attendee_notes: str = db.Column(db.String)\n    event_id: int = db.Column(\n        db.Integer, db.ForeignKey('events.id', ondelete='CASCADE'), nullable=False\n    )\n    created_at: datetime = db.Column(db.DateTime(timezone=True), default=datetime.utcnow)\n    modified_at: datetime = db.Column(\n        db.DateTime(timezone=True), default=datetime.utcnow, onupdate=datetime.utcnow\n    )\n    complex_field_values: str = db.Column(db.JSON)\n    is_consent_of_refund_policy: bool = db.Column(db.Boolean, default=False)\n    native_language: str = db.Column(db.JSON)\n    fluent_language: str = db.Column(db.JSON)\n    user = db.relationship(\n        'User',\n        foreign_keys=[email],\n        primaryjoin='User.email == TicketHolder.email',\n        viewonly=True,\n        backref='attendees',\n        sync_backref=False,\n    )\n    order = db.relationship('Order', backref='ticket_holders')\n    ticket = db.relationship('Ticket', backref='ticket_holders')\n    is_consent_form_field: bool = db.Column(db.Boolean, default=False)\n    is_consent_form_field_photo: bool = db.Column(db.Boolean, default=False)\n    is_consent_form_field_email: bool = db.Column(db.Boolean, default=False)\n    is_badge_printed: bool = db.Column(db.Boolean, default=False)\n    badge_printed_at: datetime = db.Column(db.DateTime(timezone=True))\n    is_discount_applied: bool = db.Column(db.Boolean, default=False)\n    is_access_code_applied: bool = db.Column(db.Boolean, default=False)\n    tag_id: int = db.Column(db.Integer, db.ForeignKey('tags.id', ondelete='CASCADE'))\n    tag = db.relationship('Tag', backref='ticket_holders')\n\n    @property\n    def name(self):\n        firstname = self.firstname if self.firstname else ''\n        lastname = self.lastname if self.lastname else ''\n        if firstname and lastname:\n            return f'{firstname} {lastname}'\n        else:\n            return ''\n\n    @property\n    def qr_code(self):\n        qr = qrcode.QRCode(\n            version=1,\n            error_correction=qrcode.constants.ERROR_CORRECT_L,\n            box_size=10,\n            border=0,\n        )\n        qr.add_data(self.order.identifier + \"-\" + str(self.id))\n        qr.make(fit=True)\n        img = qr.make_image()\n\n        buffer = BytesIO()\n        img.save(buffer, format=\"JPEG\")\n        img_str = str(base64.b64encode(buffer.getvalue()), 'utf-8')\n        return img_str\n\n    @property\n    def serialize(self):\n        \"\"\"Return object data in easily serializable format\"\"\"\n        return {\n            'id': self.id,\n            'firstname': self.firstname,\n            'lastname': self.lastname,\n            'email': self.email,\n            'city': self.city,\n            'address': self.address,\n            'state': self.state,\n            'country': self.country,\n            'company': self.company,\n            'taxBusinessInfo': self.tax_business_info,\n        }\n\n    @property\n    def pdf_url_path(self) -> str:\n        key = UPLOAD_PATHS['pdf']['tickets_all'].format(\n            identifier=self.order.identifier, extra_identifier=self.id\n        )\n        return (\n            f'generated/tickets/{key}/{generate_hash(key)}/'\n            + self.order.identifier\n            + '.pdf'\n        )\n", "path": "app/models/ticket_holder.py"}], "after_files": [{"content": "import base64\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom io import BytesIO\n\nimport qrcode\nfrom citext import CIText\n\nfrom app.api.helpers.storage import UPLOAD_PATHS, generate_hash\nfrom app.models import db\nfrom app.models.base import SoftDeletionModel\n\n\n@dataclass(init=False, unsafe_hash=True)\nclass TicketHolder(SoftDeletionModel):\n    __tablename__ = \"ticket_holders\"\n\n    id: int = db.Column(db.Integer, primary_key=True)\n    firstname: str = db.Column(db.String)\n    lastname: str = db.Column(db.String)\n    email: str = db.Column(CIText)\n    address: str = db.Column(db.String)\n    city: str = db.Column(db.String)\n    state: str = db.Column(db.String)\n    country: str = db.Column(db.String)\n    job_title: str = db.Column(db.String)\n    phone: str = db.Column(db.String)\n    tax_business_info: str = db.Column(db.String)\n    billing_address: str = db.Column(db.String)\n    home_address: str = db.Column(db.String)\n    shipping_address: str = db.Column(db.String)\n    company: str = db.Column(db.String)\n    work_address: str = db.Column(db.String)\n    work_phone: str = db.Column(db.String)\n    website: str = db.Column(db.String)\n    blog: str = db.Column(db.String)\n    twitter: str = db.Column(db.String)\n    facebook: str = db.Column(db.String)\n    instagram: str = db.Column(db.String)\n    linkedin: str = db.Column(db.String)\n    github: str = db.Column(db.String)\n    gender: str = db.Column(db.String)\n    accept_video_recording: bool = db.Column(db.Boolean)\n    accept_share_details: bool = db.Column(db.Boolean)\n    accept_receive_emails: bool = db.Column(db.Boolean)\n    age_group: str = db.Column(db.String)\n    home_wiki: str = db.Column(db.String)\n    wiki_scholarship: str = db.Column(db.String)\n    birth_date: datetime = db.Column(db.DateTime(timezone=True))\n    pdf_url: str = db.Column(db.String)\n    ticket_id: int = db.Column(\n        db.Integer, db.ForeignKey('tickets.id', ondelete='CASCADE'), nullable=False\n    )\n    order_id: int = db.Column(db.Integer, db.ForeignKey('orders.id', ondelete='CASCADE'))\n    is_checked_in: bool = db.Column(db.Boolean, default=False)\n    is_checked_out: bool = db.Column(db.Boolean, default=False)\n    is_registered: bool = db.Column(db.Boolean, default=False)\n    device_name_checkin: str = db.Column(db.String)\n    checkin_times: str = db.Column(db.String)\n    checkout_times: str = db.Column(db.String)\n    register_times: str = db.Column(db.String)\n    attendee_notes: str = db.Column(db.String)\n    event_id: int = db.Column(\n        db.Integer, db.ForeignKey('events.id', ondelete='CASCADE'), nullable=False\n    )\n    created_at: datetime = db.Column(db.DateTime(timezone=True), default=datetime.utcnow)\n    modified_at: datetime = db.Column(\n        db.DateTime(timezone=True), default=datetime.utcnow, onupdate=datetime.utcnow\n    )\n    complex_field_values: str = db.Column(db.JSON)\n    is_consent_of_refund_policy: bool = db.Column(db.Boolean, default=False)\n    native_language: str = db.Column(db.JSON)\n    fluent_language: str = db.Column(db.JSON)\n    user = db.relationship(\n        'User',\n        foreign_keys=[email],\n        primaryjoin='User.email == TicketHolder.email',\n        viewonly=True,\n        backref='attendees',\n        sync_backref=False,\n    )\n    order = db.relationship('Order', backref='ticket_holders')\n    ticket = db.relationship('Ticket', backref='ticket_holders')\n    is_consent_form_field: bool = db.Column(db.Boolean, default=False)\n    is_consent_form_field_photo: bool = db.Column(db.Boolean, default=False)\n    is_consent_form_field_email: bool = db.Column(db.Boolean, default=False)\n    is_badge_printed: bool = db.Column(db.Boolean, default=False)\n    badge_printed_at: datetime = db.Column(db.DateTime(timezone=True))\n    is_discount_applied: bool = db.Column(db.Boolean, default=False)\n    is_access_code_applied: bool = db.Column(db.Boolean, default=False)\n    tag_id: int = db.Column(db.Integer, db.ForeignKey('tags.id', ondelete='CASCADE'))\n    tag = db.relationship('Tag', backref='ticket_holders')\n\n    @property\n    def name(self):\n        firstname = self.firstname if self.firstname else ''\n        lastname = self.lastname if self.lastname else ''\n        if firstname and lastname:\n            return f'{firstname} {lastname}'\n        else:\n            return ''\n\n    @property\n    def qr_code(self):\n        qr = qrcode.QRCode(\n            version=1,\n            error_correction=qrcode.constants.ERROR_CORRECT_L,\n            box_size=10,\n            border=0,\n        )\n        qr.add_data(self.order.identifier)\n        qr.make(fit=True)\n        img = qr.make_image()\n\n        buffer = BytesIO()\n        img.save(buffer, format=\"JPEG\")\n        img_str = str(base64.b64encode(buffer.getvalue()), 'utf-8')\n        return img_str\n\n    @property\n    def serialize(self):\n        \"\"\"Return object data in easily serializable format\"\"\"\n        return {\n            'id': self.id,\n            'firstname': self.firstname,\n            'lastname': self.lastname,\n            'email': self.email,\n            'city': self.city,\n            'address': self.address,\n            'state': self.state,\n            'country': self.country,\n            'company': self.company,\n            'taxBusinessInfo': self.tax_business_info,\n        }\n\n    @property\n    def pdf_url_path(self) -> str:\n        key = UPLOAD_PATHS['pdf']['tickets_all'].format(\n            identifier=self.order.identifier, extra_identifier=self.id\n        )\n        return (\n            f'generated/tickets/{key}/{generate_hash(key)}/'\n            + self.order.identifier\n            + '.pdf'\n        )\n", "path": "app/models/ticket_holder.py"}]}