translations and whitespaces

This commit is contained in:
Karol
2019-10-21 18:03:56 +02:00
parent 9512fe4a79
commit f51dde4ef7
8 changed files with 14 additions and 12 deletions

View File

@ -7,7 +7,6 @@ module CodeOcean
def validate(record)
existing_files = File.where(name: record.name, path: record.path, file_type_id: record.file_type_id,
context_id: record.context_id, context_type: record.context_type).to_a
unless existing_files.empty?
if (not record.context.is_a?(Exercise)) || (record.context.new_record?)
record.errors[:base] << 'Duplicate'