forked from CGM_Public/pretix_original
Waiting list: Add name and phone number (#1987)
* add name and phone to waitinglist
* add options whether to ask for name/phone in waitinglist
* changed rendermode to checkout and added required-css-class
* changed default to original behaviour to not ask name or phone at all
* add name and phone to list-view and export
* add name and phone to Meta-class so they automagically get saved
* update shredder
* fixed isort
* Translated on translate.pretix.eu (Slovenian)
Currently translated at 19.9% (799 of 3996 strings)
Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/sl/
powered by weblate
* Translated on translate.pretix.eu (Slovenian)
Currently translated at 21.6% (865 of 3996 strings)
Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/sl/
powered by weblate
* Translated on translate.pretix.eu (Slovenian)
Currently translated at 23.8% (955 of 3996 strings)
Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/sl/
powered by weblate
* Translated on translate.pretix.eu (Slovenian)
Currently translated at 26.3% (1051 of 3996 strings)
Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/sl/
powered by weblate
* add validation to WaitingListSerializer
* update API-description
* fixed test_waitinglist.py
* Revert more of de597ba86
* Paginate list of gift cards
* Change texts on order confirmation page if no attachments are sent
* Update locales
* Added translation on translate.pretix.eu (Sinhala)
* Added translation on translate.pretix.eu (Sinhala)
* Translated on translate.pretix.eu (Sinhala)
Currently translated at 0.4% (18 of 4002 strings)
Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/si/
powered by weblate
* Fix initial value of phone number
* add colon to enumeration in description
Co-authored-by: Raphael Michel <michel@rami.io>
* update API-description with null-fields
* add name and phone to waitinglist
* add options whether to ask for name/phone in waitinglist
* changed rendermode to checkout and added required-css-class
* changed default to original behaviour to not ask name or phone at all
* add name and phone to list-view and export
* add name and phone to Meta-class so they automagically get saved
* update shredder
* fixed isort
* add validation to WaitingListSerializer
* update API-description
* fixed test_waitinglist.py
* Fix initial value of phone number
* update API-description with null-fields
* add colon to enumeration in description
Co-authored-by: Raphael Michel <michel@rami.io>
* fixed isort on migration
Co-authored-by: lapor-kris <kristijan.tkalec@posteo.si>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Co-authored-by: helabasa <R45XvezA@pm.me>
Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
committed by
GitHub
parent
8ca2fe7707
commit
8e00970f04
@@ -203,7 +203,7 @@ class EmailAddressShredder(BaseDataShredder):
|
||||
class WaitingListShredder(BaseDataShredder):
|
||||
verbose_name = _('Waiting list')
|
||||
identifier = 'waiting_list'
|
||||
description = _('This will remove all email addresses from the waiting list.')
|
||||
description = _('This will remove all names, email addresses, and phone numbers from the waiting list.')
|
||||
|
||||
def generate_files(self) -> List[Tuple[str, str, str]]:
|
||||
yield 'waiting-list.json', 'application/json', json.dumps([
|
||||
@@ -213,7 +213,7 @@ class WaitingListShredder(BaseDataShredder):
|
||||
|
||||
@transaction.atomic
|
||||
def shred_data(self):
|
||||
self.event.waitinglistentries.update(email='█')
|
||||
self.event.waitinglistentries.update(name_cached=None, name_parts={'_shredded': True}, email='█', phone='█')
|
||||
|
||||
for wle in self.event.waitinglistentries.select_related('voucher').filter(voucher__isnull=False):
|
||||
if '@' in wle.voucher.comment:
|
||||
@@ -222,7 +222,14 @@ class WaitingListShredder(BaseDataShredder):
|
||||
|
||||
for le in self.event.logentry_set.filter(action_type="pretix.voucher.added.waitinglist").exclude(data=""):
|
||||
d = le.parsed_data
|
||||
if 'name' in d:
|
||||
d['name'] = '█'
|
||||
if 'name_parts' in d:
|
||||
d['name_parts'] = {
|
||||
'_legacy': '█'
|
||||
}
|
||||
d['email'] = '█'
|
||||
d['phone'] = '█'
|
||||
le.data = json.dumps(d)
|
||||
le.shredded = True
|
||||
le.save(update_fields=['data', 'shredded'])
|
||||
|
||||
Reference in New Issue
Block a user