Skip to content

Commit 416af57

Browse files
committed
fix: don't validate options form when package is invalid
1 parent e51ac0d commit 416af57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

edit_questionpy_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ public function validation($data, $files) {
632632
$errors = parent::validation($data, $files);
633633

634634
$package = $this->validate_selected_package($data, $errors);
635-
if ($data['qpy_package_selected']) {
635+
if ($data['qpy_package_selected'] && !($data['qpy_package_invalid'] ?? 0)) {
636636
// The options form of a package is being submitted.
637637
$this->validate_options_form($data, $package, $errors);
638638
}

0 commit comments

Comments
 (0)