Skip to content

Commit be2ae5f

Browse files
committed
Skip pretix sync during Drupal update
1 parent 55d3afa commit be2ae5f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/Settings/PretixSettings.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ class PretixSettings extends AbstractSettings {
4545
* Decide if the settings are ready for use.
4646
*/
4747
public function isReady(): bool {
48+
// Skip any update hooks when Drupal is updating, cf.
49+
// https://git.drupalcode.org/project/drupal/-/blob/11.x/core/authorize.php?ref_type=heads
50+
// @todo "authorize.php is deprecated in drupal:11.2.0"
51+
// (https://git.drupalcode.org/project/drupal/-/blob/11.x/core/authorize.php?ref_type=heads#L33)
52+
if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') {
53+
return FALSE;
54+
}
55+
4856
return !empty(trim($this->url ?? ''));
4957
}
5058

0 commit comments

Comments
 (0)