Fix null BeaconShardID handling in debug endpoint

This commit is contained in:
John Pinkyfloyd 2026-02-09 12:17:36 -08:00
parent dd85e7b386
commit b2187bde4e

View file

@ -14,11 +14,15 @@
<cfabort>
</cfif>
<cfquery name="qShard" datasource="payfrit">
SELECT ID, UUID, IsActive
FROM BeaconShards
WHERE ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#qBiz.BeaconShardID#">
</cfquery>
<cfif val(qBiz.BeaconShardID) GT 0>
<cfquery name="qShard" datasource="payfrit">
SELECT ID, UUID, IsActive
FROM BeaconShards
WHERE ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#qBiz.BeaconShardID#">
</cfquery>
<cfelse>
<cfset qShard = queryNew("ID,UUID,IsActive")>
</cfif>
<cfquery name="qSP" datasource="payfrit">
SELECT ID, Name, BeaconMinor, IsActive