fix: bug where you couldn't delete allocations if no limit was set

This commit is contained in:
naterfute
2026-01-22 06:16:37 -08:00
parent d3ed2cf4ed
commit b695ef29ba
2 changed files with 2 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ class NetworkAllocationController extends ClientApiController
{
// Don't allow the deletion of allocations if the server does not have an
// allocation limit set.
if (empty($server->allocation_limit)) {
if ($server->allocation_limit === 0) {
throw new DisplayException('You cannot delete allocations for this server: no allocation limit is set.');
}

View File

@@ -117,7 +117,7 @@ class NetworkAllocationController extends ClientApiController
{
// Don't allow the deletion of allocations if the server does not have an
// allocation limit set.
if (empty($server->allocation_limit)) {
if ($server->allocation_limit === 0) {
throw new DisplayException('You cannot delete allocations for this server: no allocation limit is set.');
}