mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Make shredder code more robust
This commit is contained in:
@@ -383,9 +383,10 @@ class QuestionAnswerShredder(BaseDataShredder):
|
||||
d = le.parsed_data
|
||||
if 'data' in d:
|
||||
for i, row in enumerate(d['data']):
|
||||
for f in row:
|
||||
if f not in ('attendee_name', 'attendee_email'):
|
||||
d['data'][i][f] = '█'
|
||||
if isinstance(d['data'], dict):
|
||||
for f in row:
|
||||
if f not in ('attendee_name', 'attendee_email'):
|
||||
d['data'][i][f] = '█'
|
||||
le.data = json.dumps(d)
|
||||
le.shredded = True
|
||||
le.save(update_fields=['data', 'shredded'])
|
||||
|
||||
Reference in New Issue
Block a user