Reformat using black
This commit is contained in:
parent
efee4ad081
commit
a87fb49918
221 changed files with 19127 additions and 7310 deletions
|
@ -5,17 +5,17 @@ from lxml.html.clean import clean_html
|
|||
|
||||
|
||||
def strip_error_html(apps, schema_editor):
|
||||
Submission = apps.get_model('judge', 'Submission')
|
||||
Submission = apps.get_model("judge", "Submission")
|
||||
for sub in Submission.objects.filter(error__isnull=False).iterator():
|
||||
if sub.error:
|
||||
sub.error = clean_html(lh.fromstring(sub.error)).text_content()
|
||||
sub.save(update_fields=['error'])
|
||||
sub.save(update_fields=["error"])
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('judge', '0090_fix_contest_visibility'),
|
||||
("judge", "0090_fix_contest_visibility"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue