Skip to content

Commit

Permalink
refactor: use one transaction for packages
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderschmitz committed Dec 15, 2022
1 parent 94577a1 commit 831250c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions classes/package.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ public function store_in_db(int $contextid = 0) {

$transaction = $DB->start_delegated_transaction();
$packageid = $DB->insert_record('qtype_questionpy_package', $packagedata);
$transaction->allow_commit();

// For each language store the localized package data as a separate record.
$languagedata = array();
Expand All @@ -235,7 +234,6 @@ public function store_in_db(int $contextid = 0) {
];
}

$transaction = $DB->start_delegated_transaction();
$DB->insert_records('qtype_questionpy_tags', $tagsdata);
$DB->insert_records('qtype_questionpy_language', $languagedata);
$transaction->allow_commit();
Expand Down

0 comments on commit 831250c

Please sign in to comment.