Fix broken remove logic

Got broken in commit: b93ae50

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
CommanderRoot 2020-01-25 00:59:01 +01:00 committed by GitHub
parent bc89e83869
commit ae8c2c14e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,8 +190,12 @@ AJAX.registerOnload('table/relation.js', function () {
$newRow.find('a.add_foreign_key_field').attr('data-index', newIndex);
// Update form parameter names.
$newRow.find('select[name^="foreign_key_fields_name"]').not().first().find(
'select[name^="destination_foreign_column"]').not().first()
$newRow.find('select[name^="foreign_key_fields_name"]')
.not($newRow.find('select[name^="foreign_key_fields_name"]').first())
.find('select[name^="destination_foreign_column"]')
.not($newRow.find('select[name^="foreign_key_fields_name"]')
.not($newRow.find('select[name^="foreign_key_fields_name"]').first())
.find('select[name^="destination_foreign_column"]').first())
.each(function () {
$(this).parent().remove();
});