aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurtaza Sultani <sultani@data-quest.de>2025-05-08 11:58:37 +0200
committerMurtaza Sultani <sultani@data-quest.de>2025-05-08 11:58:37 +0200
commit8409f848da111b269c7ccc73ae3b0f759cd2a586 (patch)
tree6e4eeb63182c5adfc499fe4ab4921ba0cbdf553a
parentaa30b91fb84e0d57148b3adf7529c4d504a6215e (diff)
Remove existing booking when it overlaps with a locked booking type
-rw-r--r--lib/models/resources/Resource.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/models/resources/Resource.php b/lib/models/resources/Resource.php
index c264053..8c1158a 100644
--- a/lib/models/resources/Resource.php
+++ b/lib/models/resources/Resource.php
@@ -860,6 +860,10 @@ class Resource extends SimpleORMap implements StudipItem
$booking->internal_comment = $internal_comment;
$booking->booking_type = (int)$booking_type;
+ if ($booking_type === ResourceBooking::TYPE_LOCK) {
+ $force_booking = true;
+ }
+
//We can finally store the new booking.
try {