Fixed not finding unit sometimes in PreorderApi/submitPreorder

This commit is contained in:
Frank Schubert
2023-10-03 15:19:44 +02:00
parent a6aa87a5ee
commit acee68c6c3
4 changed files with 15 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ define("INTERNAL_USER_USERNAME", $me->username);
$ignore_preorders = [];
$campaign_prem_nord = 5;
$campaign_gross_st_florian = 7;
$same_unit_count = 0;
$missing_units = [];
@@ -25,7 +26,7 @@ $missing_doors = [];
$total = 0;
$c = 0;
foreach(PreorderModel::search(["deleted" => 0, "preordercampaign_id" => $campaign_prem_nord, "connection_count" => 2]) as $preorder) {
foreach(PreorderModel::search(["deleted" => 0, "preordercampaign_id" => $campaign_gross_st_florian, "connection_count" => 2]) as $preorder) {
// check if we have enough units with extref
$wohneinheiten = ADBWohneinheitModel::search(["hausnummer_id" => $preorder->adb_hausnummer_id]);
$unit_count = count($wohneinheiten);
@@ -119,4 +120,4 @@ foreach($missing_doors as $md) {
echo "\n";
}
echo "Processed $total, created $c preorders\n";
echo "Processed $total, created $c preorders\n";