mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Codestyle
This commit is contained in:
parent
cdb352f14a
commit
283fbca969
@ -30,9 +30,8 @@ class AddNLPJobForm(FlaskForm):
|
||||
def validate_files(form, field):
|
||||
for file in field.data:
|
||||
if not file.filename.lower().endswith('.txt'):
|
||||
raise ValidationError(
|
||||
'File does not have an approved extension: .txt'
|
||||
)
|
||||
raise ValidationError('File does not have an approved '
|
||||
'extension: .txt')
|
||||
|
||||
|
||||
class AddOCRJobForm(FlaskForm):
|
||||
@ -62,10 +61,8 @@ class AddOCRJobForm(FlaskForm):
|
||||
def validate_files(form, field):
|
||||
for file in field.data:
|
||||
if not file.filename.lower().endswith(('.pdf', '.tif', '.tiff')):
|
||||
raise ValidationError(
|
||||
'File does not have an approved extension: '
|
||||
'.pdf | .tif | .tiff'
|
||||
)
|
||||
raise ValidationError('File does not have an approved '
|
||||
'extension: .pdf | .tif | .tiff')
|
||||
|
||||
|
||||
class AddSetupFilesJobForm(FlaskForm):
|
||||
@ -82,7 +79,6 @@ class AddSetupFilesJobForm(FlaskForm):
|
||||
for file in field.data:
|
||||
if not file.filename.lower().endswith(('.jpeg', '.jpg', '.png',
|
||||
'.tiff', '.tif')):
|
||||
raise ValidationError(
|
||||
'File does not have an approved extension: '
|
||||
'.jpeg | .jpg | .png | .tiff | .tif'
|
||||
)
|
||||
raise ValidationError('File does not have an approved '
|
||||
'extension: .jpeg | .jpg | .png | .tiff '
|
||||
'| .tif')
|
||||
|
Loading…
Reference in New Issue
Block a user